Commit Graph

2193 Commits (f86482c210a1bdf46af418e629e0e263dd13cf5f)

Author SHA1 Message Date
NiLuJe cf83dc8bd3
ReaderView: Don't crash on pre-#11044 highlights without a color field (#12438)
(They'll be drawn in gray, as before)

Regression since #11044
(https://github.com/koreader/koreader/pull/11044#issuecomment-2322820971)
3 weeks ago
hius07 49e885321a
Exporter: choose highlight styles to be exported (#12431) 3 weeks ago
hius07 38c8d66b5b readerhighlight: fix showing anchored popup dialog 3 weeks ago
hius07 6f7277d269 readersearch: fix building findall result 3 weeks ago
hius07 963aa9ac7c filemanagerhistory: fix update list after deleting a file 3 weeks ago
hius07 ee5a4169d1 webdavapi: fix 'resourcetype' property check 3 weeks ago
Rowan Decker 60e0e3ef45
Add color highlight menu (#11044) 3 weeks ago
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
3 weeks ago
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
3 weeks ago
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
3 weeks ago
NiLuJe a86271b8f1 ReaderFooter: Use maybeUpdateFooter in onBookMetadataChanged
I'm not sure that one could ever have been truly problematic, but let's
be cautious ;).
3 weeks ago
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
4 weeks ago
David dd9f96eddb
ReaderFooter: fix page-turn item (#12388)
Account for per-document reading order direction adjustments.
4 weeks ago
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.
4 weeks ago
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.
4 weeks ago
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 ;).
4 weeks ago
David 4910afffdd
Add numerical key_codes to event_map on kindle 3 (#12358) 4 weeks ago
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.
4 weeks ago
hius07 9c001a660a
PDF: no "Contrast set to" notification on opening (#12391) 4 weeks ago
hius07 64094435f2
filemanagercollection: fix context menu (#12383) 4 weeks ago
hius07 415ce40f84
Touch menu: always go up to correct parent page (#12378) 4 weeks ago
hius07 ed9cde8feb
UX minor fixes (#12374) 1 month ago
hius07 f0c9a642d1
ReaderStatus, Book status widget: cleanup (#12343) 1 month ago
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.
1 month ago
David 3450aaba99
Bug Fix: DPad conflict on Kindle Keyboard (#12341)
* fix conflicting panning and content selection

* accurate keyboard info message
1 month ago
hius07 27e2efcbd2
Annotations: fix page numbers (#12324) 1 month ago
David f3c0af49c2
Support 'Ctrl' shortcuts on hasKeyboard (#12347) 1 month ago
hius07 c46578aece
BookInfo: rating, review (#12313) 1 month ago
David 466971c0e2
ReaderFooter: add page-turn item (#12249) 1 month ago
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
1 month ago
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)
1 month ago
David 2900eef276
Show/Hide Virtual keyboard and more keyboard shortcuts (#12162) 1 month ago
hius07 975efae929
ReaderSearch: "All text" improve (#12287) 1 month ago
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.
2 months ago
ziz57 c213bd779c
ReaderUI: add `seamless` argument to switchDocument (#12290) 2 months ago
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.
2 months ago
hius07 74e863c9bb
readerannotation: fix matchFunc (#12270) 2 months ago
hius07 a24bb70066
Annotations: fix exporting (#12261) 2 months ago
hius07 e5fb836a81
ReaderFooter: improve (#12243) 2 months ago
hius07 3919deef05
readerannotation: fix doesMatch func (#12231) 2 months ago
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).
2 months ago
hius07 8cb221c6c6
Annotations: pageno honors reference pages and hidden flows (#12214) 2 months ago
hius07 b17bd967da
Page turns: invert vertical tap zones (#12195) 2 months ago
Trash Panda 5affb68233
AltStatusBar: add option to show Author (#12197) 2 months ago
zwim df48d51eca
AltStatusBar/Footer: add the read timer value (#12002)
Closes #11950
2 months ago
Benoit Pierre 97735ce496 ReaderThumbnail: clear cache on rendering mode change 2 months ago
Benoit Pierre 99d45d7584 djvu: honor render mode when reflowing 2 months ago
hius07 7e3b9deb25
Annotations: more fixes (#12181) 2 months ago
David 78f69fd580
Add 'Use left and right keys for page turning' option (#12174) 2 months ago
hius07 a7d493d966
ReaderView: speedup highlights drawing (#12134) 3 months ago