Commit Graph

1596 Commits

Author SHA1 Message Date
zwim
df48d51eca AltStatusBar/Footer: add the read timer value (#12002)
Closes #11950
2024-07-19 22:55:31 +02:00
Benoit Pierre
8ced47921a PageBrowser: factorize and fix thumbnail preloading code
Fix incorrect page range check: `p >= 1 or p < self.nb_pages`
should be `p >= 1 and p <= self.nb_pages`.
2024-07-19 21:32:20 +02:00
Benoit Pierre
0c17941ffb kopt: color support
Keep colors when reflowing documents.
2024-07-19 21:32:20 +02:00
hius07
5342b8cc2a Text editor: enhancement (#12176) 2024-07-18 18:07:24 +03:00
poire-z
7ebd067a95 Footnote popup: fix XHTML handling (#12158)
Latest MuPDF update changed HTML parsing, and use a better
HTML5 parser, which may cause some issues with the XHTML
we get from crengine.
So, for footnote popups, be sure we use MuPDF's XHTML parser.
2024-07-12 13:34:47 +02:00
David
2c9bb33f66 InputText, DictQuickLookup: add keyboard shortcut for prev/next dict, toggle virtual keyboard, comma on shift+. (#12078) 2024-06-28 15:44:18 +02:00
hius07
33ae788575 configdialog: fix toggle (#12104) 2024-06-27 12:43:57 +03:00
hius07
0ae84642e2 configdialog: keep original options intact (#12093) 2024-06-26 15:22:23 +03:00
Marek Veselý
4c4cfa2db0 Kindle: add wifi selector (#12056)
* Kindle: Implement a NetworkMgr backend loosely based on WpaClient in order to allow feature-parity with hasWifiManager platforms. This involves dealing with the native wifid over lipc (the native IPC system, based on DBus), through custom Lua bindings (https://github.com/notmarek/openlipclua), since the stock ones lack support for the needed hasharray data type.
* NetworkMgr: Clear up leftover hallucinations from #10669, making `enableWifi` much simpler (and much more similar to `turnOnWifiAndWaitForConnection`).
* NetworkMgr: Made it clearer that `turnOnWifi` implementations *must* deal with `complete_callback`, as part of the aforementioned changes mean that it's *always* wrapped in a connectivity check, and we need that for proper event signaling.
* Android, Emu: Run `complete_callback` properly in `turnOnWifi`.
* Kindle: Support `powerd:isCharged()` on the PW2 (yes, this is random, it just happened to be my test device :D).
* NetworkMgr:disableWifi: Properly tear down any potential ongoing connection attempt (e.g., connectivity check).
* NetworkMgr:promptWifi: Make the "wifi enabled but not connected" popup clearer if there's an ongoing connection attempt, and gray out the "Connect" button in this case (as it would only lead to another "connection already in progress" popup anyway).
* NetworkMgr:reconnectOrShowNetworkMenu: Make *total* scanning failures fatal (they will lead to an immediate wifi teardown).
* NetworkMgr:reconnectOrShowNetworkMenu: Clear up the long-press behavior (which *always* shows the network list popup) so that it doesn't weirdly break all the things (technical term!).
* NetworkMgr:reconnectOrShowNetworkMenu: When we manage to connect to a preferred network on our own *before* showing the network list, make sure it is flagged as "connected" in said list.
* NetworkMgr:reconnectOrShowNetworkMenu: Make connection failures fatal in non-interactive workflows (they'll lead to a wifi teardown).
* NetworkSetting (the aforementioned network list widget): Clear NetworkMgr's "connection pending" flag on dismiss when nothing else will (i.e., when there's no connectivity check ticking).
2024-06-25 21:17:36 +02:00
David
799275d3a3 FileChooser: 0% > 'on hold' (#12037) 2024-06-24 10:19:25 +02:00
hius07
a1ae53c8e5 SkimTo dialog: compact mode (#12046) 2024-06-22 17:57:12 +03:00
jonnyl2
ad8e78cd09 Fix save screenshot dialog wasn't modal (#12067)
Screenshot dialog could not be interacted with in Text editor. Closes #12066.
2024-06-21 23:37:09 +02:00
David
041ca074fb [NT] MenuWidget: add keyboard shortcuts for start/end (#12065) 2024-06-21 18:07:10 +02:00
zwim
8b88f5eb73 [ConfirmBox, MultiConfirmBox ...] remove margin around (#12039) 2024-06-18 07:02:30 +02:00
hius07
ded709e3a1 InputContainer: consistent input type in onInput() (#12012) 2024-06-15 09:54:17 +03: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
David
2d07a82ea2 Add menu key event to Menu widget (#11966)
As seen here https://github.com/koreader/koreader/pull/11918#issuecomment-2137290809
2024-06-05 08:07:03 +02:00
SomeGuy
c5600ffe19 SortWidget, DictQuickLookup: rename some functions (#11949)
addressing concerns found #11933
2024-06-01 14:25:28 +02:00
hius07
b06272592d Annotation list: flexible item heights (#11918) 2024-06-01 10:32:15 +03:00
SomeGuy
c429ac8c3f Menu button support for dictquicklookup, sortwidget, keyboard settings for NT (#11933)
Menu key support for some widgets. would have closed #11783 and #6463 (cumulative with @comphilip's fixes)

It fixes a problem where some virtual keys were not available for non-touch users. closes #11862

Also, adds keyboard settings to non-touch devices. closes #11934
2024-05-31 22:33:04 +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
d217f5c161 Menu widget: limit right as hold to hasFewKeys (#11890)
Addresses concerns in #11884.
2024-05-26 15:33:06 +02:00
hius07
c6e6d72cf3 Collections: add collection mark to books (#11868) 2024-05-26 08:18:44 +03:00
Frans de Jonge
b222900cb9 Enable Alt+Shift+G for screenshots on all devices with a keyboard (#11888) 2024-05-25 21:11:38 +02:00
hius07
556e5bd6b4 VirtualKeyboard: delete word on backspace swipe west (#11843)
Closes #11831.
2024-05-25 18:51:44 +02:00
SomeGuy
81575ae24f Global long press on K4, 'ScreenKB' + 'Press' (this time for real) (#11884)
discussed #11834

then merged #11872, then reverted #11881
2024-05-25 11:11:53 +02:00
Frans de Jonge
07b507370f Revert "Global long press on K4, 'ScreenKB' + 'Press' (#11872)" (#11881)
This reverts commit 3f64ecfd28.
2024-05-24 16:34:08 +02:00
Frans de Jonge
20d8a5c313 FocusManager: enable more keyboard shortcuts by default (#11871) 2024-05-23 07:36:51 +02:00
SomeGuy
3f64ecfd28 Global long press on K4, 'ScreenKB' + 'Press' (#11872)
discussed #11834
2024-05-21 23:48:54 +02:00
SomeGuy
6c7e2a9c62 Support screenshots on Non-Touch with ScreenKB as modifier (#11802)
on devices (mostly kindles) with keyboards: Alt + Shift + G
on kindle 4: ScreenKB + Menu
2024-05-20 21:22:27 +02:00
SomeGuy
577c5d454f Non-touch DPad improvements (#11749)
Closes #11295.
2024-05-20 21:20:50 +02:00
hius07
daf0fa4b4b MultiInputDialog: fix keyboard height changed (#11832) 2024-05-16 22:10:43 +03:00
hius07
6b192c346a Annotations: Bookmark list improvement (#11825) 2024-05-16 21:57:04 +03:00
nairyo
126c01e1b5 Replace tweak_buttons_func with an event instead (#11777)
Also see https://github.com/Ajatt-Tools/anki.koplugin/issues/22
2024-05-16 20:44:01 +02:00
Philip Chan
5d63907cae fix #11810: only set FocusManager layout if hasDPod (#11811) 2024-05-15 18:29:32 +02:00
Philip Chan
f0a3bcf05b NT: add Hot swapping dictionaries button and edit button into FocusManager's layout (#11803)
fix #11783
2024-05-12 09:50:15 +02:00
peicuiping
a7e34673e6 chore: remove repetitive words (#11785) 2024-05-09 12:10:53 +02:00
Valentin Dubois
526a1fb727 Initial support for new Kobo (Clara B/W + Colour, Libra Colour) (#11737)
* Support the Clara B&W, Clara Colour & Libra Colour
* Enable HW dithering on *all* the Kobo MTK devices
* Enforce 32bpp instead of 8bpp for Kobo devices with a color panel (the driver doesn't actually support 8bpp anyway)
* Enable standby support on MTK (whenever possible, i.e., not when plugged in, as that is horribly, horribly broken).
* Enforce the dedicated "color" waveform mode for image content in ScreenSaver, ImageViewer & Reader.
* Fix charging LED support on MTK
* Tweak the frontlight ramp on MTK + LM3630 so that it actually ramps smoothly
2024-05-09 03:27:37 +02:00
sdasda7777
8530282d38 Add Czech keyboard layout (#11769)
Fixes #11339.
2024-05-08 11:04:23 +02:00
hius07
c47d3b3177 Menu widget: cleanup (#11759) 2024-05-07 09:34:30 +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
hius07
8ff846ba6e SortWidget: sort alphabetically (#11705) 2024-04-30 13:30:02 +03:00
hius07
f5be04a738 Keyboard: detect tap if swipes are disabled (#11699)
Discussed in #11668.
2024-04-24 18:23:58 +02:00
Frans de Jonge
a7edf213a5 [minor] FileChooser: use en-dash instead of dash for UI (#11615) 2024-04-04 16:00:53 +02:00
hasezoey
42c93a7623 FileChooser collates: use "item.sort_percent" for sorting + extra on-hold handling (#11592)
re https://github.com/koreader/koreader/pull/11524#issuecomment-1984110990
re https://github.com/koreader/koreader/pull/11542#issuecomment-2018164346

re #11592
2024-03-30 14:04:43 +01:00
poire-z
67cd647d1a ReaderToc: add option to show chapter lengths (#11546) 2024-03-20 10:09:44 +01:00
hius07
5414858b74 Menu widget: fix item property name (#11534) 2024-03-12 08:51:33 +02:00
hius07
6f896e9383 ReaderFooter: chapter progress bar (#11505) 2024-03-10 08:05:30 +02:00
hius07
8df885438c Bookmarks: edit highlighted text (#11484) 2024-03-09 17:03:43 +02:00
poire-z
c65d128032 Menu, DictQuickLookup, TextViewer: allow mousewheel scrolling (#11525)
We also need to catch it in TrapWidget so we can
interrupt Wikipedia articles images loading.
2024-03-09 09:11:23 +01:00