283 Commits

Author SHA1 Message Date
David
92effcf9fb Replace checkboxes with radio buttons where appropriate (#14431) 2025-10-14 22:53:47 +02:00
David
6d49c261fa [ReaderHighlight] preserve highlight when using highlight dialogue (#14437) 2025-10-14 15:22:27 +02:00
hius07
d0abd59143 readerhighlight: fix long-press with Do nothing (#14227) 2025-08-26 18:18:53 +03:00
adva-cg
6c0a5c30ba Add support for character-by-character highlighting for partial word translation (#14153)
Long-pressing on the "edit" buttons switches between "word" and "char" modes of the following single taps.
Long-pressing always moves the boundary by char.
2025-08-20 08:33:14 +03:00
hius07
92a6c7c6dc readerhighlight: fix datetime_updated for new highlights (#14155) 2025-08-09 09:43:39 +03:00
hius07
c4c95a0e90 ReaderHighlight: fix long-pressing on image (#14048) 2025-07-12 20:29:41 +03:00
hius07
ad3dddbdd2 readerhighlight: fix accidental tap while long-pressing (#14004) 2025-07-01 21:44:39 +03:00
David
d993146480 [ReaderHighlight] NT: add better support for extending highlights (#13917) 2025-06-21 11:37:01 +02:00
David
6bc5b16282 [ReaderHighlight] NT: add key event to simulate a very long press (#13914) 2025-06-21 11:36:10 +02:00
hius07
b59734dfab Minor fixes (#13930) 2025-06-13 07:42:08 +03:00
hius07
d358b26d61 Highlights: extend (#13815) 2025-05-22 17:59:44 +03:00
jonnyl2
fce94ce1de ReaderHighlight, ReaderBookmark: Highlight button labels, Bookmark details button order (#13735)
* Add Xs to highlight erase buttons

* Change order of buttons
2025-05-05 21:57:04 +02:00
hius07
4b3248700e Gesture intervals: adjust long- and very-long-press intervals (#13690) 2025-04-28 08:40:04 +03:00
David
667ab754e4 [ReaderLink] Add missing footnote settings to NT devices (#13597) 2025-04-21 18:58:22 +02:00
hius07
969f58bc56 readerhighlight: comment 2025-03-13 08:13:04 +02:00
hius07
fbfb993c6b readerhighlight: stop highlighting when sboxes are absent 2025-03-12 18:15:34 +02:00
hius07
a06be7636a Highlights: edit boundaries in pdf (#13364) 2025-03-09 07:44:43 +02:00
David
316eb87116 [ReaderHighlight] NT: account for status and alt-status bars in text selection (#13348) 2025-03-02 22:24:52 +01:00
David
546cb14ccc [DictQuickLookup] NT: add text selection to the dictionary widget (#13232)
Initially, when you open the dictionary widget from the reader, FocusManager will function as usual. On Kindle 4 or devices with a keyboard, I have assigned the shortcuts <kbd>screenkb</kbd> + <kbd>up</kbd>/<kbd>down</kbd>   or <kbd>shift</kbd> + <kbd>up</kbd>/<kbd>down</kbd> to initiate text selection (as a remainder, on kindle text selection in reader is initiated with <kbd>up</kbd>/<kbd>down</kbd> so it is fairly similar). At this point, FocusManager is disabled, allowing the cursor keys (and press) to control the now-visible crosshairs. Pressing <kbd>back</kbd> should stop text selection and restore FocusManager’s control of the widget.
2025-02-17 21:41:34 +01:00
hius07
70fcc90a3c Highlights: quicker Style and Note marker dialogs (#13223) 2025-02-12 09:14:03 +02:00
hius07
4c431e7566 Highlights: fix page boxes cache (#13200) 2025-02-07 08:30:21 +02:00
hius07
8606b132e4 Couple of minor fixes (#13185) 2025-02-01 21:25:51 +02:00
David
1698f22a9d [NT] ReaderHighlight: improve selection of hyphenated words (#13129) 2025-01-28 16:52:27 +01:00
Frans de Jonge
2b23b2f8ee ReaderHighlight: add overlooked "crosshairs" (#13152)
See #13145.
2025-01-27 12:11:23 +01:00
David
011552279a [ReaderHighlight] rewrite some UI strings (#13145) 2025-01-26 19:33:31 +01:00
hius07
ea46d71634 Highlights: anchored dialogs (#12810) 2024-12-05 18:53:59 +02:00
hius07
47feaaa1df Highlights: page boxes cache (#12768) 2024-11-23 14:05:05 +02:00
hius07
93f2fa6702 Highlight: line height (#12721) 2024-11-21 07:54:23 +02:00
jonnyl2
fa20344a15 ReaderHighlight: Highlight menu, change 'Delete' to Trash can icon (#12758)
Closes #12754; as discussed there.
2024-11-20 20:31:20 +01:00
Frans de Jonge
11981821f6 [minor] ReaderHighlight: normalize more spelling of PDF (#12732) 2024-11-12 21:06:31 +01:00
Frans de Jonge
d3893b6cf1 [minor] ReaderHighlight: normalize spelling of PDF (#12731) 2024-11-12 21:05:16 +01:00
hius07
54e33d27ea ReaderHighlight: fix color for extended highlight in pdf (#12654)
Closes #12653.
2024-10-18 20:59:31 +02:00
hius07
f143f5f8b1 ReaderHighlight: adjustable "Edit highlight" dialog position (#12599) 2024-10-11 19:26:33 +03:00
hius07
bf290e0c2b Write highlights into PDF: revisited (#12509) 2024-09-14 15:21:26 +03:00
hius07
7572a812cc Highlights popup dialog: add "Color" and "Details" buttons (#12461) 2024-09-07 17:56:40 +03:00
NiLuJe
ffc4929504 ReaderHighlight: Fix an old typo in the OCR help string (#12479)
Noticed while triaging #12478 ;)
2024-09-07 16:23:56 +02:00
NiLuJe
f8df76e5c4 misc: Move cleanupSelectedText to util (#12477)
Instead of duplicating it across ReaderHighlight, languagesupport, and potentially VocabBuilder.

Re: #12469
2024-09-06 23:06:28 +02:00
hius07
49e885321a Exporter: choose highlight styles to be exported (#12431) 2024-08-31 19:28:48 +03:00
hius07
38c8d66b5b readerhighlight: fix showing anchored popup dialog 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
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
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
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
David
9bff98034f ReaderHighlight: minor bug fixes (#12033)
Fixes bug reported in https://github.com/koreader/koreader/pull/11916#issuecomment-2170605117 and an issue where back button would not close widget in file manager.
2024-06-16 10:38:02 +02:00
David
04eec52eee BookMap on devices with useDPadAsActionKeys (#11916)
as first discussed here #11908. This PR brings the book map to non-touch devices that useDPadAsActionKeys().

Book map can be accessed from the menu or by using the following shortcut: ScreenKB + Down or Shift + Down depending on whether you use a K4 device or a kindle with keyboard respectively.

Inside the book map, a user can toggle the hamburger menu by pressing the Menu key and make any adjustment from there. ScreenKB (or Shift) + Up/Down allows it to scroll and Page turn buttons to move by whole full page turns. Back key allows user to exit the map.
2024-06-05 22:50:22 +02:00
Benoit Pierre
4c6919ac2a bump base: update tesseract, leptonica and libk2pdfopt
- update leptonica to 1.84.1
- update tesseract to 5.3.4
- update libk2pdfopt to 2.55
2024-06-01 09:56:36 +02:00
Frans de Jonge
8f2bd5420d Introduce Device:useDPadAsActionKeys() (#11900)
1. Non-Kindle-specific `hasFiveWay` behavior is changed to `hasDPad and useDPadAsActionKeys`. For now they remain Kindle-specific in practice, unless one sets `useDPadAsActionKeys = yes` in a user patch.
2. With that disambiguation out of the way, `hasFiveWay` itself is further disambiguated into `hasScreenKB` and `hasSymKey`, as per the actual property being used, rather than something that tends to correlate with it. (It needn't be Kindle-specific per se, but non-Kindle devices have equivalent shortcuts with for example `Shift`.)
  Running the emulator with `DISABLE_TOUCH=1` will set `hasSymKey = yes`, which can be tested with right shift.

Closes #11887.
2024-05-26 21:25:54 +02:00
SomeGuy
00d0affd70 Remove very long press settings from NT (#11898) 2024-05-26 15:34:29 +02:00
SomeGuy
577c5d454f Non-touch DPad improvements (#11749)
Closes #11295.
2024-05-20 21:20:50 +02:00
hius07
6b192c346a Annotations: Bookmark list improvement (#11825) 2024-05-16 21:57:04 +03:00