Commit Graph

270 Commits

Author SHA1 Message Date
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)
Some checks are pending
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Waiting to run
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Waiting to run
2025-03-02 22:24:52 +01:00
David
546cb14ccc [DictQuickLookup] NT: add text selection to the dictionary widget (#13232)
Some checks failed
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Has been cancelled
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Has been cancelled
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)
Some checks are pending
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Waiting to run
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Waiting to run
2025-02-12 09:14:03 +02:00
hius07
4c431e7566 Highlights: fix page boxes cache (#13200)
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run
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
SomeGuy
baab326332 [ReaderHighlight] Remove duplicated setting on NT devices (#11750)
Closes #11747.
2024-05-11 21:25:50 +02:00
hius07
12c3c190b0 Annotations: fixes 2 (#11788)
* readerbookmark: fix index for reverse sorting

* readerhighlight: fix pdf tap on highlight detection
2024-05-09 20:53:53 +03:00
hius07
725df17c45 Annotations: fixes (#11761) 2024-05-07 19:54:57 +03:00
hius07
d82815952e Annotations, part 1 (#11563)
New format to handle annotations (page bookmarks, highlights, notes) and store them in the book metadata files.
2024-05-03 09:08:57 +03:00
SomeGuy
f6588e95e8 ReaderHighlight: ~~strikeout~~ → Strikethrough (#11619) 2024-04-04 11:22:36 +02:00
hius07
bdb1c3135c Fulltext search: default mode, fixes (#11507) 2024-03-10 07:57:50 +02:00
hius07
8df885438c Bookmarks: edit highlighted text (#11484) 2024-03-09 17:03:43 +02:00
NiLuJe
5bd78ab3b4 ReaderHighlight: Don't try to close a non-existent widget in onClose 2024-01-15 04:29:09 +01:00
poire-z
a025faae4e Text selection: show top left icon when very-long-press delay reached 2024-01-13 10:13:47 +01:00
poire-z
455e904120 Text selection: add option to disable corner scroll
People using 2-steps text selection (via the Select button) may
want to not be annoyed by this feature.
Also tweak a bit its behaviour, requiring now the text selection
to come from outside a corder into a corner to activate it, which
should allow starting text selection from a corner without
triggering a scroll yet.
2024-01-13 10:13:47 +01:00
hius07
f4a5a2b60a TextViewer: add dialog to set font size and justify text (#11210) 2023-12-14 07:50:54 +02:00
hius07
d99c70b5e1 ReaderHighlight: adjustable highlight dialog position (#11116) 2023-11-19 09:52:51 +02:00
hius07
6b892a65a3 ReaderHighlight: delete highlight in view note dialog (#11039) 2023-10-29 11:33:29 +01:00