Due to changes to renderOptimizedPage(...) made by #15067, which was merged after #14954 was made, a regression was introduced that causes instability and even crashes on mobile devices and e-readers when Invert Document is enabled along with Reflow or Auto Straighten.
This PR fixes the regression and simplifies the drawContextPage(...) method.
Also increased the available range for the minimum width in the UI from 50% of the screen width to 90%, since with the fixed setting it could otherwise never get larger than 50%, but a wider size will be useful if only few and short items fill up less than 50% of the remaining space.
Fix annotation import to preserve notes, filter by type, deduplicate,
map drawer, and delete originals from PDF after import.
Closes#15075. Depends on koreader-base#2287.
Add a CCLASS_SQUOTE character class and ST_ATTR_VAL_SQ state to the
lexer FSM so single-quoted attributes are parsed correctly without
cross-matching with double-quoted ones. Both quoting styles are valid
XML per the spec.
Due to the way this was wired, #14937 trigged BookStatusWidget:onSwitchFocus() when closing, which caused the review input dialog to pop right back up again.
But it doesn't look like you're actually supposed to be able to type in there at all, so I replaced it with a TextBoxWidget.
* refactor handling of faked event HoldRelease for text selection on NT, make sure we close the cycle properly so we don't get any byte drift when dealing with non-ascii characters.
the firmware version of the PocketBook 623 does not provide NetMgrPing()
this leads to the application crashing after WiFi is activated and the
keepalive is scheduled
Wikipedia recently started enforcing user agents to contain a contact
link. Without a contact, the request is subject to 429 errors when
requesting images.
* refactor onStopHighlightIndicator so it returns early
* stop text selection when opening menus or triggering hotkeys
* use self.ui.highlight (naturally)
* remove duplicated setDirty
We may happen to have an empty selection while panning,
no reason to abort the selection yet before release.
Also add get_segments=true to remaining calls to
getScreenBoxesFromPositions() that we forgot to
update to use it.
* Removed the hold-duration logic for switching between dictionary and wiki lookups, simplifying the process and removing timing-based domain switching, this was a terrible idea on my part (in hindsight, the implementation I mean).
* Added a new `TextSelectorModifierPress` key event and corresponding handler (`onTextSelectorModifierPress`) to explicitly switch domains (Dict <-> Wiki) during text selection, and for following links inside dictionary entries, thus making the feature more discoverable and reliable.
* Refactored the lookup logic into a dedicated `_performLookupOnSelection` function, improving code clarity.
* Updated the gesture coordinate calculation in `_createTextSelectionGesture` to use `text_widget` absolute position instead of `definition_widget`, ensuring correct screen coordinates and accounting for container padding.
Previously, on SDL targets (Desktop, Ubuntu Touch), the system text input loop was gated by the visibility of the On-Screen Virtual Keyboard. Hiding the VK would call Device:stopTextInput, effectively disabling the physical keyboard.
This commit binds the text input state to the lifecycle of the InputText widget instead:
* Improve up/down behavior. Down at the end of an input moves focus down, up at the beginning moves focus up.
* Undo removal of key_event for touch devices, allowing vk to work regardless of vk state, #FreeTheKeyboard