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

2191 Commits

Author SHA1 Message Date
hius07
38c8d66b5b readerhighlight: fix showing anchored popup dialog 2024-08-31 15:18:18 +02:00
hius07
6f7277d269 readersearch: fix building findall result 2024-08-31 15:18:18 +02:00
hius07
963aa9ac7c filemanagerhistory: fix update list after deleting a file 2024-08-31 15:18:18 +02:00
hius07
ee5a4169d1 webdavapi: fix 'resourcetype' property check 2024-08-31 15:18:18 +02:00
Rowan Decker
60e0e3ef45
Add color highlight menu (#11044) 2024-08-30 22:10:43 +02:00
NiLuJe
a486acf48b
FileManagerSetDefaults: Handle strings that we default to nil (#12433)
The actual defaults table is a hash, so we have no way of salvaging it from there without using a custom NULL type or another kind of sentinel value.
But since everything that actually *uses* the offending defaults expects a nil, don't rock the boat, and just fix the Advanced Settings widget to be able to deal with it.

Fix #11679
Regression since #9546
2024-08-30 16:02:24 +02:00
NiLuJe
7e52c15de2
FileManager: Handle the FlushSettings event (#12425)
It's used on Android when we're murdered by the task switcher, and when doing an OTA update.

Fix #12124
2024-08-29 11:28:16 +02:00
NiLuJe
5fc5386e87 ReadTimer: Don't blindly repaint the footer in update_status_bars
Send a dedicated event that will let ReaderFooter check if we actually have anything relevant to display, and will do the usual "should I repaint/refresh" checks ;).

Fix #12323
Regression since #12002
2024-08-28 23:53:38 +02:00
NiLuJe
a86271b8f1 ReaderFooter: Use maybeUpdateFooter in onBookMetadataChanged
I'm not sure that one could ever have been truly problematic, but let's
be cautious ;).
2024-08-28 23:53:38 +02:00
jonnyl2
f3005906d4
Readerfont: current font on top in menu; new fonts from current session on top in font test doc (#12410)
* Move down call setupFaceMenuTable(); list current font on top in menu if sorted by recently selected.

* New fonts from current session listed on top in fonts test documents; small wording changes
2024-08-26 22:51:29 +02:00
David
dd9f96eddb
ReaderFooter: fix page-turn item (#12388)
Account for per-document reading order direction adjustments.
2024-08-25 22:44:19 +02:00
poire-z
9f308399f9 Book style tweak editor: fix double notification on discard
Avoid two identical stacked notifications "Book tweak not modified"
after Close + Discard when text was modified.
2024-08-25 22:39:31 +02:00
poire-z
db8786f058 ReaderRolling: fix batched notifications sometimes not shown
When a profile changes a few settings (ie. font), a few notifications
may be stacked, before the single rerendering happens. If that rendering
takes some time, the notifications' timeout may close them as soon
as it is done, before they get a chance to be painted/refreshed.
So, delay a bit more that rerendering to be sure the notifications
are shown.
2024-08-25 22:39:31 +02:00
NiLuJe
9cd305177e
FocusManager: Fix focus_flags check in moveFocusTo, and deal with the fallout (#12361)
* FocusManager: Fix `focus_flags` check in `moveFocusTo` (0 is truthy in Lua, can't do AND checks like in C ;).)
* FileManager+FileChooser: Pass our custom title bar directly to FileChooser (which also means we can now use FC's FocusManager layout directly).
* FileChooser/Menu: Get rid of the weird `outer_title_bar` hack, and simply take a `custom_title_bar` pointer to an actual TitleBar instance instead.
* FileManager/Menu/ListMenu/CoverMenu: Fix content height computations in `_recalculateDimen` (all the non-FM cases were including an old and now unused padding value, `self.header_padding`, leading to more blank space at the bottom than necessary, and, worse, leading to different item heights between FM views, possibly leading to unnecessary thumbnail scaling !)
* ButtonDialog: Proper focus management when the ButtonTable is wrapped in a ScrollableContainer.
* ConfigDialog: Implement a stupid workaround for a weird FocusManager issue when going back from `[⋮]` buttons.
* ConfigDialog: Don't move the visual focus in `update` (i.e., we use `NOT_FOCUS` now that it works as intended).
* DictQuickLookup: Ensures the `Menu` key bind does the exact same thing as the hamburger icon.
* DictQuickLookup: Ensure we refocus after having mangled the FocusManager layout (prevents an old focus highlight from lingering on the wrong button).
* FileChooser: Stop flagging it as no_title, because it is *never* without a title. (This behavior was a remnant of the previous FM-specific title bar hacks, which are no longer a thing).
* FileChooser: Stop calling `mergeTitleBarIntoLayout` twice in `updateItems`. We already call Menu's, which handles it. (Prevents the title bar from being added twice to the FocusManager layout).
* FocusManager: Relax the `Unfocus` checks in `moveFocusTo` to ensure we *always* unfocus something (if unfocusing was requested), even if we have to blast the whole widget tree to do so. This ensures callers that mangle self.layout can expect things to work after calling it regardless of how borked the current focus is.
* FocusManager: Allow passing `focus_flags` to `refocusWidget`, so that it can be forwarded to the internal `moveFocusTo` call.
* FocusManager: The above also allows us to enforce a default that ensures we do *not* send a Focus event on Touch devices, even if they have the hasDPad devcap. This essentially restores the previous/current behavior of not showing the visual feedback from such focus "events" sent programmatically, given the `focus_flags` check fix at the root of this PR ;).
* InputDialog: Fix numerous issues relating to double/ghost instances of both InputText and VirtualKeyboard, ensuring we only ever have a single InputText & VK instance live.
* InputDialog: Make sure every way we have of hiding the VK play nice together, especially when the `toggleKeyboard` button (shown w/ `add_nav_bar`) is at play. And doubly so when we're `fullscreen`, as hiding the VK implies resizing the widget.
* InputText: Make sure we're flagged as in-focus when tapping inside the text field.
* InputText: Make sure we don't attempt to show an already-visible VK in the custom `hasDPad` `onFocus` handler.
* Menu: Get rid of an old and no longer used (nor meaningful) hack in `onFocus` about the initial/programmatically-sent Focus event.
* Menu: Get rid of the unused `header_padding` field mentioned earlier in the FM/FC fixes.
* Menu: Use `FOCUS_ONLY_ON_NT` in the explicit `moveFocusTo` call in `updatePageInfo`, so as to keep the current behavior of not showing the visual feedback of this focus on Touch devices.
* Menu: Make sure *all* the `moveFocusTo` calls are gated behind the `hasDPad` devcap (previously, that was only the case for `updatePageInfo`, but not `mergeTitleBarIntoLayout` (which is called by `updateItems`).
* MultiInputDialog: Actively get rid of the InputText & VK instances from the base class's constructor that we do not use.
* MultiInputDialog: Ensure the FocusManager layout is *slightly* less broken (password fields can still be a bit weird, though).
* TextViewer: Get rid of the unfocus -> layout mangling -> refocus hack now that `refocusWidget` handles this case sanely.
* VirtualKeyboard: Notify our parent InputDialog when we get closed, so it can act accordingly (e.g., resize itself when `fullscreen`).
* ScrollableContainer: Implement the necessary machinery for focus handling inside ButtonDialog (specifically, when scrolling via PgUp/PgDwn).
* TextEditor: Given the above fixes, the plugin is no longer disabled on non-touch devices.
* ReaderBookMark: Make sure we request a full refresh when closing the "Edit note" dialog, as CRe highlights may extend past its dimensions, and if it's closed separately from VK, the refresh would have been limited to its own dimensions, leaving a neat InputDialog-sized hole in the highlights ;).
2024-08-25 19:34:31 +02:00
David
4910afffdd
Add numerical key_codes to event_map on kindle 3 (#12358) 2024-08-24 14:17:40 +02:00
Frédéric Brière
39fa008e21
Bookmarks: refresh list entry when closing Bookmark details dialog with X (#12390)
Also: refresh dogear state for current page when closing Page browser
or Book map, as we may have toggled bookmark on it.
2024-08-21 23:46:51 +02:00
hius07
9c001a660a
PDF: no "Contrast set to" notification on opening (#12391) 2024-08-21 20:57:22 +03:00
hius07
64094435f2
filemanagercollection: fix context menu (#12383) 2024-08-21 20:55:02 +03:00
hius07
415ce40f84
Touch menu: always go up to correct parent page (#12378) 2024-08-21 20:53:45 +03:00
hius07
ed9cde8feb
UX minor fixes (#12374) 2024-08-19 08:10:14 +03:00
hius07
f0c9a642d1
ReaderStatus, Book status widget: cleanup (#12343) 2024-08-19 08:05:19 +03:00
charrarr
91c15d5277
ReaderFont: display preview of italic-only fonts in italic (#12351)
In font selection menus, ask creengine for italic versions
of fonts if there's no regular version to preview.
Also prevents a crash when a font can't be previewed in
the font family menu.
2024-08-18 09:28:23 +02:00
David
3450aaba99
Bug Fix: DPad conflict on Kindle Keyboard (#12341)
* fix conflicting panning and content selection

* accurate keyboard info message
2024-08-13 22:54:08 +02:00
hius07
27e2efcbd2
Annotations: fix page numbers (#12324) 2024-08-13 22:18:24 +03:00
David
f3c0af49c2
Support 'Ctrl' shortcuts on hasKeyboard (#12347) 2024-08-13 20:34:34 +02:00
hius07
c46578aece
BookInfo: rating, review (#12313) 2024-08-11 17:01:15 +03:00
David
466971c0e2
ReaderFooter: add page-turn item (#12249) 2024-08-10 10:09:23 +02:00
NiLuJe
cafa9c8251
Disable the legacy ReaderRotation module (#12309)
AFAICT, this has never worked since the KPV -> KOReader refactor, as it relies on a weird little DrawContext "feature", while the actually in-use rotation framework is handled via BlitBuffer.

That kludge pollutes *a lot* of both the backend and frontend code, so I plan to annihilate that in a followup PR.

See #12303 for more context
2024-08-08 04:53:04 +02:00
NiLuJe
46a5d20513
Document: Do not cache panel-zoom tiles to disk and fix their caching and rendering (#12303)
* Use a dedicated cache hash for partial tiles from panel-zoom
* Never dump them to disk, as it confuses DocCache's crappy heuristics that rewinds the cache to skip over the hinted page to try to dump the on-screen page to disk.
* Apply the zoom factor in the exact same way as any other page rect (i.e., floor coordinates, ceil dimensions), and make sure said rect is actually a Geom so it doesn't break the cache hash, which relies on Geom's custom tostring method for rects. Said scaling method *also* belongs to the Geom class anyway.
* Handle such pre-scaled rects properly in renderPage, so as not to apply the zoom factor to the full page, which would attempt to create a gigantic buffer.
* And now that the rect is rendered properly in an appropriately-sized buffer, use the rendered tile as-is, no need to blit it to another (potentially way too large because of the above issue) blank BB.
* The zoom factor is now computed for a scale to best-fit (honoring `imageviewer_rotate_auto_for_best_fit`), ensuring the best efficiency (ImageViewer won't have to re-scale).
* Cache: Reduce the maximum item size to 50% of the cache, instead of 75%.
* Warn about the legacy ReaderRotation module, as it turned out to be horribly broken. The whole machinery (which is spread over *a lot* of various codepaths) is left as-is, peppered with notes & fixmes hinting at the problem. Thankfully, that's not how we actually handle rotation, so it was probably hardly ever used (which possibly explains why nobody ever noticed it breaking, and that nugget possibly dates back to the inception of the kpv -> ko refactor!). (#12309)
2024-08-08 04:52:24 +02:00
David
2900eef276
Show/Hide Virtual keyboard and more keyboard shortcuts (#12162) 2024-08-07 18:09:40 +02:00
hius07
975efae929
ReaderSearch: "All text" improve (#12287) 2024-08-06 19:12:16 +03:00
poire-z
949b996ad7
Fix early unhighlight after Add to vocab builder (#12288)
Getting text from xpointers to get the current selected
word context would have crengine unhighlight that word.
Allow to get it selected again when done getting context.
2024-08-04 23:27:30 +02:00
ziz57
c213bd779c
ReaderUI: add seamless argument to switchDocument (#12290) 2024-08-04 20:02:45 +02:00
NiLuJe
030f4a15d4
ReadHistory: On remove, trust the index from FileManagerHistory if possible (#12253)
The item's idx field is based on the current view settings, so only trust it when there's no filtering or searches involved, which ensures the order matches the actual history array layout.
2024-08-03 21:49:11 +02:00
hius07
74e863c9bb
readerannotation: fix matchFunc (#12270) 2024-08-02 22:36:34 +03:00
hius07
a24bb70066
Annotations: fix exporting (#12261) 2024-08-01 13:14:46 +03:00
hius07
e5fb836a81
ReaderFooter: improve (#12243) 2024-08-01 13:11:28 +03:00
hius07
3919deef05
readerannotation: fix doesMatch func (#12231) 2024-07-29 17:39:44 +03:00
NiLuJe
d59c837714
Kobo: Refactor various aspects of the Kaleido/MTK support (#12221)
* UIManager: Let the fb backend deal with Kaleido wfm promotion. This fixes a number of quirks that poisoned the refresh queue with spurious full-screen refreshes. See https://github.com/koreader/koreader-base/pull/1865 for more details.
* This also means we now disable Kaleido waveform modes when color rendering is disabled (remember to trash your thumbnail cache if you don't want to mix color w/ grayscale thumbnails, though).
* UIManager: Merge refreshes that share an edge, because that was driving me nuts (and would have most likely been merged by the kernel anyway). A perfect test-case is the FM, which trips two separate refreshes because of its title bar.
* ReaderFlipping: Use sensible dimensions, so that we only refresh the icon's region.
* ReaderBookmark: Only refresh the dogear instead of the whole page when toggling bookmarks.
* NetworkSetting: Make it a real boy, so it consistently refreshes properly on dismiss instead of relying on UIManager saving the day.
* Kobo: Aggressively prevent *both* suspend & standby while MTK devices are plugged-in, as both will horribly implode the kernel (we previously only prevent standby while charging).
* Kobo: Switch to 8bpp on B&W MTK devices (or when color rendering is disabled on Kaleido panels).
2024-07-28 01:19:40 +02:00
hius07
8cb221c6c6
Annotations: pageno honors reference pages and hidden flows (#12214) 2024-07-24 18:35:48 +03:00
hius07
b17bd967da
Page turns: invert vertical tap zones (#12195) 2024-07-24 18:34:23 +03:00
Trash Panda
5affb68233
AltStatusBar: add option to show Author (#12197) 2024-07-21 20:11:46 +02:00
zwim
df48d51eca
AltStatusBar/Footer: add the read timer value (#12002)
Closes #11950
2024-07-19 22:55:31 +02:00
Benoit Pierre
97735ce496 ReaderThumbnail: clear cache on rendering mode change 2024-07-19 21:32:20 +02:00
Benoit Pierre
99d45d7584 djvu: honor render mode when reflowing 2024-07-19 21:32:20 +02:00
hius07
7e3b9deb25
Annotations: more fixes (#12181) 2024-07-19 16:52:16 +03:00
David
78f69fd580
Add 'Use left and right keys for page turning' option (#12174) 2024-07-18 08:33:23 +02:00
hius07
a7d493d966
ReaderView: speedup highlights drawing (#12134) 2024-07-06 15:24:01 +03:00
hius07
6d73442ecd
Reader: always exit to book folder (#12129) 2024-06-30 14:29:22 +03:00
hius07
add783156d
ReaderBookmark: fix sort by date 2 (#12112) 2024-06-28 13:27:15 +03:00