2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

3267 Commits

Author SHA1 Message Date
poire-z
c51b0c7bb9 BookMap: add option Alternative theme
When enabled in BookMap, both BookMap and PageBrowser get:
- alternating gray background on chapter spans
- hatched background instead of uni-gray on hidden flows.
Also, with both normal look and this alternative theme,
show some hatched overlay on thumbnails part of hidden flows.

ReaderToc: for each TOC item, have it carry its sequence/number
in that level (we do this in validateAndFixToc() where we are
already iterating all the items).
2023-10-09 00:15:05 +02:00
poire-z
5406fdf2e0 BookMap/PageBrowser: update upper instance when leaving lower one
BookMap and PageBrowser instances can be stacked; when
toggling a bookmark in a lower PageBrowser and closing it,
make sure the bookmark is shown in the BookMap we get back to.
Also consider TOC and hidden flows as a thing that can be
edited and needs refreshing, so we're ready for next commits
about custom TOC and custom hidden flows.
Also update Reader footer when closing the last BookMap
or PageBrowser.
2023-10-09 00:15:05 +02:00
poire-z
2b75ef108e PageBrowser: allow tap/hold on thumbnail before it is loaded
There was no real reason for having to wait.
Also avoid possible crash when a background generated
thumbnail would be displayed after other things happened.
2023-10-09 00:15:05 +02:00
poire-z
1c128f1089 PageBrowser: taller vertical marks for thumbnail rows in viewfinder
Instead of small markers below the baseline, use
translucent vertical lines over most of the ribbon's
height to mark thumbnail rows, so we can more easily
relate chapter spans to thumbnail rows.
2023-10-09 00:15:05 +02:00
poire-z
fb6bc0391f PageBrowser: add option to preload next/prev page thumbnails 2023-10-09 00:15:05 +02:00
poire-z
bbf923c7a8 BookMap/PageBrowser: allow mousewheel scrolling
Also fix SDL to use sendEvent() instead of broadcastEvent(),
so such BookMap scrolling doesn't also scroll pages in the
book below.
2023-10-09 00:15:05 +02:00
poire-z
52c45ef6db InputDialog: add param to setInputText() to set cursor pos
When not provided, the cursor stays at its initial position,
which might not be the best if replacing the whole content,
where we would prefer to have it at start or end.
2023-10-09 00:15:05 +02:00
poire-z
da424486ef FrameContainer: allow for hatched background or overlay
Bump base for BlitBuffer:hatchRect().
base bump also includes:
- Update to HarfBuzz 8.2.1
- tests and ci updates
2023-10-09 00:15:05 +02:00
François Gannaz
128302873d
New menu option and filemanager filter to hide finished books #7158 (#10895)
* New menu option and filemanager filter to hide finished books #7158

The default behavior is to display the finished books (no change on
upgrade). For consistency with the two similar options, it represented
by a checkbox "Show hidden books" that is checked by default.

The implementation is straightforward, meaning that, when the option is
unchecked, each file will require a call to `filemanagerutil.getStatus`
that checks its status.

For clarity, the code uses the "finished books" expression because the
condition is relevant to the *book* metadata, while the other settings
are about *file* attributes.
2023-10-04 19:04:07 +03:00
hius07
0c5240074c
screen_rotation_menu_table: deduplicate (#10954) 2023-09-29 07:44:28 +03:00
hius07
cafe565ade
screensaver_menu: radio buttons (#10931) 2023-09-23 10:21:44 +03:00
hius07
ed5c1cef20
ButtonTable: remove unused (#10926) 2023-09-22 09:06:30 +03:00
NiLuJe
34ba2fab30
NetworkMgr: Handle non-blocking turnOnWifi implementations better (#10863)
* Device: Add a `hasSeamlessWifiToggle` devcap to complement `hasWifiToggle`, to denote platforms where we can toggle WiFi without losing focus, as this has obvious UX impacts, and less obvious technical impacts on some of the NetworkMgr innards...
* Android: Mark as `!hasSeamlessWifiToggle`, as it requires losing focus to the system settings. Moreover, `turnOnWifi` returns *immediately* and we *still* run in the background during that time, for extra spiciness...
* NetworkMgr: Ensure only *one* call to `turnOnWifi` will actually go on when stuff gets re-scheduled by the `beforeWifiAction` framework.
* NetworkMgr: Ensure the `beforeWifiAction` framework will not re-schedule the same thing *ad vitam aeternam* if a previous connection attempt is still ongoing. (i.e., previously, on Android, if you backed out of the system settings, you entered the Benny Hill dimension, as NetworkMgr would keep throwing you back into the system settings ;p). This has a few implications on callbacks requested by subsequent connection attempts, though. Generally, we'll try to honor *explicitly interactive* callbacks, but `beforeWifiAction` stuff will be dropped (only the original cb is preserved). That's what prevents the aforementioned infinite loop, as the `beforeWifiAction` framework was based on the assumption that `turnOnWifi` somewhat guaranteed `isConnected` to be true on return, something which is only actually true on `hasWifiManager` platforms.
* NetworkMgr: In `prompt` mode, the above implies that the prompt will not even be shown for concurrent attempts, as it's otherwise extremely confusing (KOSync on Android being a prime example, as it has a pair of Suspend/Resume handlers, so the initial attempt trips those two because of the focus switch >_<").
* NetworkMgr: Don't attempt to kill wifi when aborting a connection attempt on `!hasSeamlessWifiToggle` (because, again, it'll break UX, and also because it might run at very awkward times (e.g., I managed to go back to KOReader *between* a FM/Reader switch at one point, which promptly caused `UIManager` to exit because there was nothing to show ;p).
* NetworkMgr: Don't drop the connectivity callback when `beforeWifiAction` is set to prompt and the target happens to use a connectivity check in its `turnOnWifi` implementation (e.g., on Kindle).
* Android: Add an `"ignore"` `beforeWifiAction` mode, that'll do nothing but schedule the connectivity check with its callback (with the intent being the system will eventually enable wifi on its own Soon(TM)). If you're already online, the callback will run immediately, obviously. If you followed the early discussions on this PR, this closely matches what happens on `!hasWifiToggle` platforms (as flagging Android that way was one of the possible approaches here).
* NetworkMgr: Bail out early in `goOnlineToRun` if `beforeWifiAction` isn't `"turn_on"`. Prompt cannot work there, and while ignore technically could, it would serve very little purpose given its intended use case.
* KOSync: Neuter the Resume/Suspend handlers early on `CloseDocument`, as this is how focus switches are handled on Android, and if `beforeWifiAction` is `turn_on` and you were offline at the time, we'd trip them because of the swap to system settings to enable wifi.
* KOSync: Allow `auto_sync` to be enabled regardless of the `beforeWifiAction` mode on `!hasSeamlessWifiToggle` platforms. Prompt is still a terrible idea, but given that `goOnlineToRun` now aborts early if the mode is not supported, it's less of a problem.
2023-09-21 18:21:09 +02:00
hius07
684fc22ffc
TextViewer: font size (#10911) 2023-09-19 08:39:25 +03:00
Wim de With
1773b62ce8
Check for Noto Emoji font in UI fallback fonts (#10908) 2023-09-17 21:16:55 +02:00
hius07
be125af949
Actions for Go to first/last bookmark (#10899) 2023-09-15 07:24:31 +03:00
hius07
3f677a7fdd
copt/kopt options: deduplicate some defaults (#10893) 2023-09-13 07:49:57 +03:00
hius07
cc82ead981
copt deduplicate: font settings (#10885) 2023-09-09 12:44:56 +03:00
hius07
7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 2023-09-08 08:41:44 +03:00
hius07
f46f341b9b
Reset settings/cover/metadata separately (#10866) 2023-09-05 07:42:46 +03:00
hius07
a767ad44db
PDF contrast: incorrect set by a gesture (#10798) 2023-09-02 09:41:27 +03:00
NiLuJe
4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
2023-09-01 22:51:41 +02:00
hius07
ed2ea6803f
Custom metadata (#10861) 2023-09-01 08:07:29 +03:00
Wim de With
599a3034ca
NetworkManager: Decode SSID to UTF-8 (#10864)
wpa_supplicant returns all non-ASCII SSIDs as raw bytes in the form
\x0a. We interpret these bytes as UTF-8, and make sure that all invalid
characters are replaced with a �.
2023-08-31 19:29:30 +02:00
hius07
1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
2023-08-30 07:53:59 +03:00
poire-z
9d5d5d4a30
InputText/InputDialog: fix keyboard issue (#10850)
Fix issue introduced by 976aaf5f: with full screen
text editor and hiding the keyboard, a tap in the
text area would show a new keyboard hiding the
buttons allowing to save/close the text editor,
getting us stuck there.
2023-08-27 15:12:51 +02:00
NiLuJe
d1bbdb5dad PocketBook: Run Generic:exit *last*
Makes more sense this way.

Re: #10828

Also clarify the UIManager "no dialogs left" message, and drop the
return value, as it's meaningless, we just want to break & return.
2023-08-19 17:25:10 +02:00
NiLuJe
910b67d35b NetworkListener: Only disable Wi-Fi on suspend on hasWifiManager platforms
Assume the host system does things right otherwise.
Should be sane on Kindle
On PocketBook, who knows, but assuming the device actually suspends,
that should effectively kill our keepalive
Irrelevant for Android, as we skipped it because the wifi toggling
methods are interactive.
2023-08-18 00:19:46 +02:00
NiLuJe
d52e0a0dfe NetworkManager: Always flip wifi_was_on when interactively tearing down Wi-Fi
Fix #10823

(For reference, we *enable* wifi_was_on no matter *how* wifi is enabled,
but we only toggle it off when it's killed by a *direct* user interaction,
the intent being that if *something* non-interactive enabled wifi,
you'll probably silently need it on resume too).
2023-08-18 00:19:46 +02:00
NiLuJe
7e628958b6 Misc: review pass for #10803 2023-08-15 21:24:11 +02:00
NiLuJe
6d47b3241c NetworkManager: Fully tear down WiFi on aborted connection attempts
The proper connectivity check did it, now every early or not so early
abort do.
2023-08-15 21:24:11 +02:00
NiLuJe
5146358605 NetworkManager: Allow backends to report connection failures early
As early as turnOnWifi.
Implement it on hasWifiManager platforms, preventing useless
connectivity checks to run when they're obviously never going to work
because you're out of range of your AP.

Also implemented a flag to notify the backend if the connection attempt
was interactive or not.
Right now, interactive is extremely restricted, it basically means the
menu checkmark, or a gesture.
The intent being that for stuff like the beforeWifiAction framework, we
don't want the backend to spawn extra UI.
Specifically, for hasWifiManager platforms, we no longer spawn the AP
scan list on failure unless the caller was interactive.

TL;DR: beforeWifiAction is now much less obnoxious when you're obviously
not able to connect.
2023-08-15 21:24:11 +02:00
NiLuJe
bc235b3d19 NetworkManager: Make goOnlineToRun abort on tap (anywhere)
Assuming it's past the blocking portion of this endeavor, if any.

Fix #10807
2023-08-15 21:24:11 +02:00
NiLuJe
976aaf5f53 InputText: Actually flip the is_keyboard_hidden flag properly
MultiInputDialog does a close -> show in the same callback,
so if we don't actually keep it in sync with the actual state, we lose
the keyboard and essentially softlock the UI, which is Very Bad(TM).

NOTE: InputDialog has its own keyboard_hidden flag, and it looks...
fairly nightmarish.
2023-08-15 21:24:11 +02:00
NiLuJe
7a5216a0a6 NetworkManager: Plug a logic hole in the beforeWifiAction logic
The *runWhenOnline wrappers may not pass a callback when connected but
not online yet, so we need nil guards all the way down ;).

Re: #10806
2023-08-15 21:24:11 +02:00
NiLuJe
22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
2023-08-15 21:24:11 +02:00
NiLuJe
ac1358e0f0 Menu: Actually hide PlatformNav if !hasKeys
Returning {} just leads to a present but blank entry

(Also, nobody notice that the capcheck was wrong inside platnav anyway ;p).
2023-08-15 21:24:11 +02:00
NiLuJe
f4aca567ef Kobo: Allow disabling key repeats
Re #10743

Note that this only makes faulty switches slightly less annoying: for a
stuck switch, instead of a string of page turns, you'll get a single
missed page turn on the tap that actually releases the stuck contact...
2023-08-15 21:24:11 +02:00
NiLuJe
ddf6f3616c Menu: Amend the previous commit
Kindle animations are Reader only ;).
2023-08-15 21:24:11 +02:00
NiLuJe
6283674c47 Menu: Split off "Page Turns" submenu in two sections
The Kindle swipe animations & physical key inversion apply *everywhere*,
so we need this accessible in the FM, too.

Move it to Navigation, which is where it already was on !Touch devices.
2023-08-15 21:24:11 +02:00
hius07
1544ca28af
FileManager: truncate left in selected files list (#10783)
Truncate the path to view the filename in full. Closes #10760.
2023-08-10 17:01:07 +02:00
poire-z
cc391514b5 Translator: explicite wording above each section 2023-08-10 16:57:12 +02:00
poire-z
e641c89eee View HTML & CSS: fix minor spacing issues 2023-08-10 16:57:12 +02:00
yparitcher
f3fc2ac353 do not allow clipboard to be nil
we use it as text anyway and test if it is the empty string also.

this fixes a crash in viewhtml when holding a selector with an empty clipboard, we try to contcate getClipboardText which is nil (on !SDL & !Android)
2023-08-08 16:15:40 -04:00
zwim
2ba3353d8a
[AutoWarmth] use CheckButton for night mode toggle (#10762) 2023-08-03 01:01:38 +02:00
NiLuJe
724db0b924
Statistics: Close the DB handle in the vacuum OTM block (#10775)
Followup to #10749
2023-08-02 18:47:38 +02:00
weijiuqiao
416237e526
Statistics: Attempt to prevent rampant replication of null id_books (#10749)
And add an OTM block to do a cleanup pass on existing DBs (which might take a while if you're severely affected, because we've seen reports of DBs north of 2GB).
2023-08-02 06:09:15 +02:00
poire-z
626864f856 [chore] replace utf8 bytes with Unicode escape sequence 2023-08-02 01:28:24 +02:00
poire-z
b03992c077 ViewHTML: fix content messed up when consecutive nbsp
Fix bug in replace_in_html() when consecutive
matches.
Also ensure content after leading indentation is not
wrapped on the next line.
2023-08-02 01:28:24 +02:00
poire-z
08e9c27a32 Wikipedia EPUBs: re-add ToC in content
The ToC is no longer in the HTML we get from the
Wikipedia API. So, add it ourselves.
Also, as we can't get anywhere the Wikipedia localized
string for "Contents" (ie. "Sommaire" in French), use
thick <HR> to mark the start and end of this ToC.
2023-08-02 01:28:24 +02:00
ichnilatis-gr
583ae40e46
Greek keyboard: update to the new keyboard layout (#10734) 2023-08-02 00:34:48 +02:00
NiLuJe
9c8e55b3e5
Kobo: Yet another attempt at working around the hangs on the latest NXP boards (#10771)
* Notification: Drop the fencing from #10083; it never actually helped, and had subtle side-effects we could do without.
* VirtualKeyBoard: Flash on close, otherwise, some of the fast refresh glitches may be burned into the working buffer until a flash. Making sure we flash ourselves prevent it from sticking around on the page ;).
* util: Move `writeToSysfs` to base (i.e., `ffi/util`), as we need it there (and it actually makes more sense there anyway ;p).
* Bump base for https://github.com/koreader/koreader-base/pull/1645, which is where the actual workaround (hopefully) lives.

Re #8414, #9806, #10558
2023-08-01 23:53:10 +02:00
poire-z
4fa278ff0b Wikipedia: handle images in changed Wikipedia HTML
The HTML we get from Wikipedia has recently changed,
which has caused images to not be detected and shown
in DictQuickLookup, and to be missing or ugly in
saved EPUBs. Update our code and CSS to display them
again.
2023-07-26 01:05:15 +02:00
poire-z
eecdac930e View HTML: Show matched rules: ignore style & tweaks on long-press
On long-press on the "Show matched stylesheets rules"
buttons, ignore those from our epub.css/html5.css and
from styletweaks, which may make investigating a book
style simpler without their noise.
2023-07-26 01:05:15 +02:00
NiLuJe
dacc3c2f72
NetworkManager: Bypass isOnline on !hasWifiToggle platforms (#10697)
Followup to #10669, fix #10694
2023-07-15 23:58:51 +02:00
Frans de Jonge
3bec20fc25
NetworkManager: improve clarity for chatty framework user-facing explanation (#10696)
See https://github.com/koreader/koreader/pull/10669/files#r1263385527
2023-07-15 17:19:35 +02:00
Glen Sawyer
73c4f09a88
FileChooser: re-add file sort by "last date read" (#10682)
Revert bits from eb299c30.
2023-07-12 22:33:14 +02:00
poire-z
d0e705a582
Font list menu: allow sorting by more recently set (#10662)
- Add a toggle in Font settings> allowing showing font
  ordered by most recently selected (long-press on
  it allows clearing this history).
- Keep in G_reader_settings a list of known fonts, so
  we can notice newly added user fonts, and put them
  at the start of the most recently selected. Show
  these new fonts with a symbol in the menu.
- TouchMenu: allows for a flag to trigger menu
  refresh when going up.
2023-07-12 22:29:13 +02:00
NiLuJe
d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
2023-07-12 02:42:16 +02:00
hius07
b33971b92d
OPDS fixes (#10657) 2023-07-11 07:49:27 +03:00
hius07
86f4b3c18d
QuickMenu: anchor to gesture position 3 (#10646) 2023-07-08 08:17:42 +03:00
Martín Fernández
5336e2f11d
[ota]: deprecation check & notice (#10639) 2023-07-04 22:58:40 +02:00
Benoit Pierre
346d8eb83e
Decrease fonts memory use (#10618)
Instead of opening the same font multiple times for each different
size (multiple face instances), share one face instance and create
multiple size instances.
2023-07-04 09:13:16 +02:00
hius07
dee1c902ec
ReaderUI: minor optimization (#10634) 2023-07-03 17:43:13 +03:00
hius07
eb299c300d
FileChooser: Sort by date (#10627) 2023-07-03 08:24:28 +03:00
NiLuJe
08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
2023-07-03 01:23:14 +02:00
yparitcher
1f62091b73
HtmlboxWidget: pairs->ipairs (#10574)
thanks @poire-z
Closes: #10565
2023-06-13 11:52:46 +02:00
hius07
46933035c5
Open with: images (#10561) 2023-06-12 09:08:56 +03:00
poire-z
18cd6b79d8
BookMap: fix help text wording (#10544)
See https://github.com/koreader/koreader/pull/10530#discussion_r1217635869.
2023-06-05 18:45:41 +02:00
poire-z
04425b74fc BookMap: add "Overview" mode
Add a restricted but convenient mode showing BookMap like
in initial view, while still allowing chapter levels to be
tweaked. This allows getting back to this view with another
gesture to see the overall progress in the book, while
still having the normal BookMap in flat mode acting as
an alternative ToC.
Available as an action to associate to a gesture, and
with long-press on the "Book map" menu item.
2023-06-05 00:58:15 +02:00
poire-z
b7078caf29 BookMap: add option "10-page markers"
Allows hairy-boxes amateurs to get small markers (under
the baseline) every 10 pages (with -/+ to get small or
medium markers, with optionally smaller ones every 5 pages).
2023-06-05 00:58:15 +02:00
poire-z
5f4cd9df00 BookMap: add option "Page browser on tap"
Enabled by default, to get the current behaviour.
Disabling it allows people with small fingers to jump
directly to that page in Reader.
2023-06-05 00:58:15 +02:00
poire-z
ac159928dd BookMap: nicer alignment of the vertical page number
Align page numbers (the vertical ones, on the left of
a BookMapRow) on the baseline of the BookMapRow, where
page slots rise from.
Also tweak the page number spike below the baseline used
in PageBrowser.
2023-06-05 00:58:15 +02:00
poire-z
fa68c1e488 PageBrowser: smaller margins if no thumbnail page numbers
Also fix possibly unbalanced left and right margins.
2023-06-05 00:58:15 +02:00
hius07
38bb4a1983
QuickMenu: scrollable (#10528) 2023-06-04 15:29:30 +03:00
hius07
a8244ddd23
FileChooser: fix legacy "Files and folders mixed" collate setting (#10514)
Closes #10509.
2023-05-31 14:26:13 +02:00
NiLuJe
17d5934712
Notification: NOP conflicting event handlers from our base class (#10471)
Notification is a toast, so it doesn't stop event popagation.
If we don't disable thoses handlers inside Notification, we get spurious
duplicate handlers being fired ;).

Fix #10461
2023-05-21 01:23:41 +02:00
poire-z
011c168686
Wikipedia EPUBs: strip out invalid-XHTML <link> (#10462) 2023-05-19 16:48:36 +02:00
NiLuJe
7e98b9de4b
PM: Minor refactor to suspend/resume code flow (#10426)
Make sure we only send Suspend/Resume events when we *actually* suspend/resume. This is done via the Device `_beforeSuspend`/`_afterResume` methods, and those were called by the *input handlers*, not the PM logic; which means they would fire, while the PM logic could actually take a smarter decision and *not* do what the event just sent implied ;).

(i.e., sleep with a cover -> suspend + actual suspend, OK; but if you then resume with a button -> input assumes resume, but PM will actually suspend again!).

Existing design issue made more apparent by #9448 ;).

Also fixes/generalizes a few corner-cases related to screen_saver_lock handling (e.g., don't allow USBMS during a lock).

And deal with the fallout of the main change to the Kobo frontlight ramp behavior ;).
2023-05-18 23:13:43 +02:00
hius07
3dce41269d
Translator: translate current page (#10438) 2023-05-17 07:34:37 +03:00
NiLuJe
b989a6ff15
NaturalLightWidget: Fallback to previous values instead of nil (#10425)
Happens in case the InputText field is emptied by the user.
The backend code makes rather strong assumptions that it'll *always* get a number of of it ;).

Fix #10352
2023-05-13 20:45:47 +02:00
NiLuJe
5c353c2289
OTM: Attempt to deal with wonky config states (#10429)
Such states (not quite sure how you could actively get in such a broken state to begin with, mind you)  could lead to an attempt to load an old fontlist cache in an incompatible format.

Re: #9771
2023-05-13 20:44:39 +02:00
poire-z
fc81c7db24 DictQuickLookup: add button to show list of results
Add a left button to the title bar to show the list
of results as a popup.
Dictionary: tap or long-press on that button give
different view of the results.
Wikipedia: request 30 results instead of 20, so we
can show 15, 10 or 6 of them per page of that popup.
2023-05-12 20:12:10 +02:00
poire-z
8c8a032269 ButtonDialog: allow for step/page scrolling
With tall ButtonDialog with many rows, allows for a more
natural and readable scrolling without any truncated row
(like in Excel, we previously behave as web browsers).

ButtonTable:
- make the span and separator layout more explicite
- add some small horizontal padding when button text
  is centered
2023-05-12 20:12:10 +02:00
poire-z
7a95d11f07 ScrollableContainer: add support for step/grid scrolling
When the containee is row-based, this can ensure that when
scrolling with swipes, we get the a full row at top, and
that any truncated row at top or bottom is fully visible
after a swipe.
2023-05-12 20:12:10 +02:00
poire-z
0ee10e5049 Button: fix unstable height
The final height of a button could be different whether
a smaller font size or multiline end up being used.
Also fix 2-lines logical error making it less favored.
Also forward any lang property to the underlying text widgets.
2023-05-12 20:12:10 +02:00
poire-z
4fa7e718a2 TextBoxWidget:getFontSizeToFitHeight(): allow for more accuracy
By providing the font that will be used.
As it's more expensive, use only when really needed.
2023-05-12 20:12:10 +02:00
hius07
b4f453eb58
Page overlap: add "Horizontal line" marker (#10401) 2023-05-07 20:28:18 +03:00
hius07
2ba694d394
FileChooser: fix percent sorting (#10393) 2023-05-05 22:48:36 +03:00
yparitcher
1102c030fa
Kindle: toggle cover events
Allow disabling the hall efect sensor via the sysfs knob, so the kindle system wont sleep & wake the device

for those of use that stay in koreader, are caseless and have get spurious wakeups
2023-05-03 10:26:35 -04:00
hius07
4f23a6fafa
Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
John Hackett
3f9820052d
Add esperanto-english dictionary (#10297) 2023-05-03 10:18:53 +02:00
hius07
9db74f1f01
ConfirmBox: add widgets (#10364) 2023-05-02 08:25:34 +03:00
hius07
a5320acf4f
koptoptions: fix default margin (#10376)
Regression from #10208.
Closes #10373.
2023-05-01 10:09:06 +02:00
zwim
00b3594d44
Kobo: Refactor frontlight toggle ramp behavior (#10305)
* Rewrite the loop mechanism to use scheduled tasks instead of a single blocking-ish subprocess.
* Change the actual logic to be more pleasing to the eye, especially on newer devices, as those *may* natively ramp on set; and fix a bad interaction with that behavior that could lead to no ramp at all on ramp down.
* Simplify Generic's Suspend handling to deal with the refresh ordering in a saner manner. The screensaver might be visible a tad longer than before this change before the frontlight actually ramps off.
2023-04-30 23:28:30 +02:00
zwim
662bd65a5f
Fix some screen refresh effects (#10306) 2023-04-30 22:15:34 +02:00
poire-z
04fba2205d PageBrowser: show page number alongside thumbnails
Add a top left menu item -/+ to show none, only on the
first thumbnail of a row, or on all thumbnails.
Also make the page slot separator longer in the bottom
ribbon before pages that start a thumbnails row.
Also show a little spike in the bottom ribbon below page
slots that get their page number displayed, to ease
figuring out the connection.
2023-04-30 20:46:09 +02:00
weijiuqiao
cb9cbff10e
KeyValuePage: fix corner-case alignment bug (#10326)
Change algorithm to comparing all kv pairs.
Also ignore any pairs where the value is "" when computing
the alignment, since they usually are intended more as
a title and should not interfere.
2023-04-28 23:53:37 +02:00
NiLuJe
53e6cf563a
Deal with table.pack corner-cases properly (#10350)
c.f., https://github.com/koreader/koreader-base/pull/1603 for more
details.

Re: #9624
2023-04-24 00:21:05 +02:00
hius07
be7d6008d1
Reader: do not apply line spacing out of range (#10307)
* readercoptlistener: fix line spacing out of range

* readerkoptlistener: fix line spacing out of range

* creoptions: fix line spacing limit
2023-04-13 20:43:04 +02:00