* refactor onStopHighlightIndicator so it returns early
* stop text selection when opening menus or triggering hotkeys
* use self.ui.highlight (naturally)
* remove duplicated setDirty
Center the scaled cover image on both axes unconditionally instead
of branching on which dimension is the limiting factor. The branch
was susceptible to floating point rounding in math.floor causing
scaled_w to be 1 pixel less than s_w, flipping the alignment from
vertically centered to top-aligned depending on the cover's pixel
dimensions.
Fixes#14986.
* CoverImage: call iv2sh to update PocketBook startup logo on cover change
After the cover image file is written or reset, invoke PocketBook's
iv2sh WriteStartupLogo command so the device's boot logo is actually
updated. The command runs in the background to avoid blocking KOReader.
* CoverImage: use correct screen dimensions on PocketBook for boot logo
For PocketBook devices, Screen:getWidth/getHeight returns
dimensions that iv2sh will not accept. In that case, we should call
Screen:getScreenWidth and Screen:getScreenHeight instead so the
generated boot logo has the correct size.
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.
Includes:
- Add support for CSS width: fit-content
- fb2def.h: add a few common attributes
- lvtext: includes src->t.offset in word->t.start
- CSS: support for pseudo element ::first-letter
- ::first-letter: fix when single letter text node
- ldomXPointer::getRectEx(): return optional context
- ldomXRange::getSegmentRects(): fix when BiDi/RTL
- testAuthorDotTitleFormat: fix off-by-one error
- Epub ncx TOC: don't skip items with invalid href
- Avoid some compiler warnings
- ldomDocument::createXPointer(pt): better consistency
- CSS: add support for "ruby-position: over/under/alternate"
- MathML: don't handle anything when no def style set
cre.cpp:
- add requestRender()
- getTextFromPositions(): improvements
base:
- Fix offs_x/offs_y typo in BB_add_blit_from fast path
- lua-Spore: fix matching plain application/json
- libpng: update to 1.6.55
- luajit: update to 2.1.1770989063
- ci/circle: bump docker images
On some Onyx Boox devices, the SurfaceView surface is not recreated
after the rapid activity cycling that the Boox system performs on wake,
leaving android.app.window permanently nil. This caused a black screen
after font size change + sleep + wake.
The SurfaceView with setZOrderOnTop(true) was introduced for NGL4/Tolino
devices. The Onyx Qualcomm EPD API (View.refreshScreen) does not require
a SurfaceView — einkUpdate() already falls back to the DecorView content
view when no SurfaceView exists. Setting
OnyxEPDController.needsView()=false makes Onyx devices use
NativeActivity's default DecorView surface, which follows the standard
activity lifecycle and correctly survives wake.
Fixes#12445
* 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
https://github.com/koreader/koreader/pull/14895 is a bit inefficient and does not take the option to lock the orientation in place.
This change reuses the existing functionality and in turn respects the other settings as well
Wrap LIPC calls in pcall() to prevent crashes when accessing Wi-Fi properties.
This PR adds error handling to five critical functions that interact with the Kindle's LIPC (Lab126 IPC) system for Wi-Fi management. Without proper error handling, these functions can crash KOReader when LIPC calls fail.