2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

5959 Commits

Author SHA1 Message Date
SomeGuy
1b37aa1bd6
Keyboard menu: remove swipe setting from NT (#11944) 2024-06-01 08:27:17 +02:00
hius07
84d28dc5d9
FontList: skip Kindle blacklisted fonts (#11932)
Closes #11927.
2024-06-01 00:25:46 +02:00
SomeGuy
512065fa14
ReaderLink: make AddCurrentLocationToStack always show notification when activated via keypress (#11925)
As seen here https://github.com/koreader/koreader/pull/11900#discussion_r1615474301.
2024-05-31 22:36:03 +02: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
SomeGuy
1aefd80ea6
ReaderBookmark: "bookmark current page" removed from NT kindles (#11907)
Discussed https://github.com/koreader/koreader/issues/11834#issuecomment-2132411929 onwards.
2024-05-27 12:04:24 +02:00
Frans de Jonge
94372c2adf
Remove ShowFontMenu (#11904)
Some clean up, as suggested in <https://github.com/koreader/koreader/pull/11864#discussion_r1615312993>.
2024-05-27 11:03:50 +02:00
Frans de Jonge
ffc43030ec
ReaderLink: change (hasScreenKB or hasSymKey) add to notification stack shortcut to Press instead of Down (#11905)
See 316c6a0624 (r1615314584)
2024-05-27 09:06:51 +02:00
hius07
9223cde2bd
Status bar: fix book progress (#11885) 2024-05-27 07:42:49 +03: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
Frans de Jonge
a21db40745
[i18n] ReaderBookmark: don't bother translators with a space (#11902) 2024-05-26 17:53:39 +02:00
SomeGuy
00d0affd70
Remove very long press settings from NT (#11898) 2024-05-26 15:34:29 +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
076f77282b
FileManager copy/move: do not paste to itself (#11878) 2024-05-26 08:19:45 +03:00
hius07
c6e6d72cf3
Collections: add collection mark to books (#11868) 2024-05-26 08:18:44 +03:00
ziz57
7925455b68
Add ReaderLink::registerScheme for plugins handling non-http(s) links (#11889)
Currently, links with a scheme other than http or https are rejected. But plugins may want to handle them. This allows them to, by registering the scheme with self.ui.link:registerScheme("example") during the plugin's init.
2024-05-25 23:38:44 +02: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
NiLuJe
f0f37e3153
Kobo: Boost saturation for CFA refreshes (and add a dev setting to disable it) (#11883)
Being able to disable it can be interesting, because it *is* a somewhat destructive process.

* Requires a base bump:
https://github.com/koreader/koreader-base/pull/1793
https://github.com/koreader/koreader-base/pull/1794
2024-05-25 01:29:15 +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
poire-z
fd7e224c16 userpatch: add a few helpers that can be used in userpatches
Make the few tricks we discovered readily available,
which should make user patches simpler.
2024-05-24 09:36:19 +02:00
poire-z
f00a88aef7 AltStatusBar: show page info similar as in footer
We now build the "page/total %" string ourselves,
with the same logic as used in the footer (including
when hidden flows or reference page numbers are used)
and give it to crengine to be displayed instead of
its own way of doing it.
2024-05-24 09:36:19 +02:00
poire-z
54a0cdd737 ReaderFooter: fix minor issues with pages left & chapter progress
When using Reference page numbers, "Pages left" was showing the
same info as "Current page", because Reference pages, being strings,
couldn't be used for arithmetics. But we can just count the number
of items left in the Reference pages array of strings.

Also fix edge case with "page progress" with hidden flow when
we are before the first chapter with a hidden flow before.
2024-05-24 09:36:19 +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
Frans de Jonge
5b18c30336
Quickstart guide: set dir="rtl" when we're in an RTL language (#11867)
Reported by @Monirzadeh in <https://github.com/koreader/koreader/issues/11147#issuecomment-2122164344>.
2024-05-21 23:01:05 +02:00
SomeGuy
e859109885
Status bar: major UI makeover (#11678) 2024-05-21 21:13:53 +02:00
poire-z
40814bf12b
bump crengine: minor fixes (ruby, a crash, non-linear flows) (#11863)
Includes:
- html5.css: really ensure ruby centering
- getRenderedWidths(): fix possible crash with 0-width images
- Page splitting: ignore empty non-linear flows
- LvDocView header: allow overriding "page/total %"
CreDocument: add setPageInfoOverride() to allow tweaking
top status bar display of page number/count/% (to be
implemented in a later commit).
2024-05-20 23:38:53 +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
yparitcher
59fb906921
NetworkListener: fix FM integration & properly gate behind hasWifiToggle (#11858) 2024-05-20 08:37:40 +02:00
NiLuJe
4d9c6523ad
Input: Some more followups to the input device auto-detection stuff (#11855)
Switch to a new `input.fdopen` API & wrapper so we can keep the fds opened by `fbink_input_scan` instead of closing them to re-open them right after that...

This should hopefully help on racy zForce devices that attempt to handle power management when opening/closing the device. We know this sometimes horribly fail to re-activate the IR grid (c.f., our manual activation on resume), but this apparently could also happen here (re: #11844) because of the quick succession of open->close->open.
2024-05-19 22:53:14 +02:00
Nico Hirsch
3b97e2988a
Shorten home folder path for info messages (#11853)
The info messages for opening files always show the full path. By using `filemanagerutil.abbreviate`, the info messages now show the shortened home folder path (only if the setting "shorten home folder" is enabled).
2024-05-19 13:19:38 +02:00
Tomáš Janoušek
e94550a261
PocketBook: Open links in the on-device web browser (#11787)
Many PocketBook devices include a web browser, but when clicking a link in KOReader, there was no option to open the link in the browser, there was only an option to show a QR code (which can then be scanned by a smartphone).

This commit implements `canOpenLink`/`openLink` on PocketBook using the "browser.app", if available.

Tested on PB740 (InkPad 3).

Fixes: https://github.com/koreader/koreader/issues/11782
Related: https://github.com/koreader/koreader/issues/6597
2024-05-18 16:57:03 +02:00
Martín Fernández
7bded465eb
SDL: add flatpak flavor (#11833)
* ship metadata with generic linux binaries
* append release version & data at build time
2024-05-18 13:21:59 +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
hius07
46449eb06e
Page overlap: add dashed line marker (#11804)
Requested by our contributor in #11734 (comment).
2024-05-16 20:44:53 +02: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
hius07
db63db11b2
FileManager: safe initial path (#11774)
We do not like trailing slash in the path (except root).
Closes #11772.
2024-05-16 20:42:08 +02:00
NiLuJe
05168b22f5
Kindle: Don't forget about fiveways on legacy devices & fix a couple input-scan misdetections (#11827)
* Kindle: Don't forget to open INPU_DPAD devices for the fiveways. Somehow managed to skip my mind, they're often on a separate input device.

Regression since #11807

* Update FBInk to fix a few cases of input_scan misdetection (on misconfigured drivers (e.g., no DIRECT prop on supported kernels), or old kernels with no EVIOCGPROP support).

Fix #11824
2024-05-15 23:58:01 +02:00
Philip Chan
5d63907cae
fix #11810: only set FocusManager layout if hasDPod (#11811) 2024-05-15 18:29:32 +02:00
NiLuJe
fd5260f2ce
Support auto-detection of input devices via fbink_input (#11807)
* Kobo: Drop a bunch of if ladder crap and switch to auto-detection of input devices via fbink_input
* Kindle: Drop an even larger bundle of crap to do the same ;p. (re: #11392)
* ExternalKeyboard: Switch to fbink_input to whitelist keyboards instead of the manual parsing of caps via its FindKeyboard class
* Input: Extended open/close wrappers to handle logging & tracking of dupe open/close calls.
2024-05-15 05:42:48 +02:00
mergen3107
8a316f928a
Kindle: remove separate L and R orientations (#11780)
Fixes #11743
2024-05-14 10:31:14 +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
SomeGuy
baab326332
[ReaderHighlight] Remove duplicated setting on NT devices (#11750)
Closes #11747.
2024-05-11 21:25:50 +02:00
Joshua Bullock
1398154546
Gesture: Add toggle for orientation lock (#11795) 2024-05-11 11:47:33 +02:00
Predrag Đokić
eb6e5e3c20
Kindle: Fix missing Amazon UI screensaver after exiting KOreader (#11794) 2024-05-10 22:18:41 +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
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
725df17c45
Annotations: fixes (#11761) 2024-05-07 19:54:57 +03:00
hius07
c47d3b3177
Menu widget: cleanup (#11759) 2024-05-07 09:34:30 +03:00
zwim
bf58723af1
[CoverImage] Honor rotation after opening of a book (#11752)
If rotation changes, create a new cache entry and use that if necessary.

Fixes #11713.
2024-05-06 22:53:13 +02:00
poire-z
001e90db1e ReaderSearch: delay adding to location stack until we change page
Search may highlight matches on the current page, and if there
are no others in the book, we would stay there and resume reading;
but we would get a spurious previous location (ie. in Book map)
that we would not expect keeping, and we may accidently go back
to previous location, losing our reading position.
Avoid this by only adding current page to location stack when
actually leaving the current page.
Because of complications with other reading modes, this is
currently only enabled for CRE document when in page mode.
2024-05-05 21:02:21 +02:00
poire-z
7d94562602 ReaderToc: fix issues when on a page before first Toc Item
When on a page before the first ToC item (the first chapter),
that first chapter title may be shown in the footer instead
of a more correct blank title.
This bug might still have had other small effect elsewhere.
2024-05-05 21:02:21 +02:00
poire-z
ca90b982b4 ReaderStyleTweak: reword CSS suggestions info text 2024-05-05 21:02:21 +02: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
6b0d97bf22
Multiple collections (#11693) 2024-05-01 09:01:59 +03:00
hius07
8ff846ba6e
SortWidget: sort alphabetically (#11705) 2024-04-30 13:30:02 +03:00
Benoit Pierre
e8544316a8
pocketbook: simplify device model detection (#11721)
To avoid avoid having to manually handle the multiple
ways a model name reported by inkview can be formatted.
2024-04-29 20:57:16 +02:00
vyaus
f793c6a36c
Gesture: add jump to random page (#11727) 2024-04-28 17:03:58 +02:00
Galunid
ca14420372
Add relevant nil guards to prevent reflow crashes (#11715)
closes #10854 #9272 #4481
2024-04-27 23:16:13 +02:00
hius07
f5be04a738
Keyboard: detect tap if swipes are disabled (#11699)
Discussed in #11668.
2024-04-24 18:23:58 +02:00
mergen3107
caea0e8fb2
Kindle Scribe: improve gyro detection, replace accel with acc keyword (#11696)
Fixes #11691.
2024-04-20 22:30:04 +02:00
ElimGarak1
bfc84795c8
Add PocketBook Era Color (PB700K3) (#11695)
Fixes #11684.
2024-04-19 10:15:29 +02:00
SomeGuy
c70c9f0905
Hide hidden flows and custom toc from non-touch devices (#11690) 2024-04-18 13:16:27 +02:00
mergen3107
d3011571a3
Kindle Scribe: find accelerometer based on hardware (#11642)
Closes #11392 (temporarily).
2024-04-18 09:33:11 +02:00
poire-z
d178273671
bump base, luajit-launcher, avoid assert failure in sub-processes (#11658)
Bump base:
- Update LuaJIT to 20240310
- harfbuzz: fix ccache 4.9.1 errors
- ci: drop unnecessary macOS build dependency
- CRE: avoid assert failure in sub-processes
Bump luajit-launcher:
- Update LuaJIT to 20240310
Frontend:
- CreDocument: prevent assert failure in sub-processes
2024-04-10 22:39:59 +02:00
Frans de Jonge
31c28378e7
[i18n] GetText: fix fuzzy detection for certain strings (#11648)
Reported in <https://github.com/koreader/koreader/pull/11647#issue-2233008767>.

Probably overlooked in #5807
2024-04-09 22:19:36 +02:00
SomeGuy
fb86acaf1a
Sleep screen wording fixes (#11647) 2024-04-09 12:53:30 +02:00
Frans de Jonge
ad266f46c2
GetText: fix crash if a value is used as unique value and as singular/plural (#11643)
Concretely 1 second, %1 seconds since #11549 added `1 second` all by itself.
2024-04-09 10:17:26 +02:00
SomeGuy
279f16aa23
Sleep screen menu reworked (#11549) 2024-04-08 22:47:17 +02:00
Bastian Wagner
aaa56a814f
CreDocument: support added 'identifier' metadata (#11628)
Currently not exposed in Book information.
2024-04-08 04:17:41 +02:00
Tomas Janousek
1fbdc1f19d NetworkMgr: Limit the hasDefaultRoute check in isOnline to PocketBooks
It's not necessary on other platforms. To be more precise, it would be
necessary on Kobo as well, but there's a different workaround in place:
https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224
2024-04-07 21:58:12 +02:00
Tomas Janousek
4fa6783dbb NetworkMgr: Use cheaper/simpler hasDefaultRoute in isOnline
Device:getDefaultRoute parses /proc/net/route and converts the hex
addresses to textual IP addresses, but in `isOnline` we don't care what
address the gateway actually has, we only care about whether we have a
default route into the Internet.

This provides a simpler alternative that does the equivalent of
"ip route get 203.0.113.1 || ip route get 2001:db8::1" (note that it
does support IPv6-only connectivity as opposed to
Device:getDefaultRoute) and returns true if we have a route.

Inspired by https://github.com/pavel-odintsov/get_default_outgoing_ip_linux
2024-04-07 21:58:12 +02:00
Tomas Janousek
b3e125a7ce NetworkMgr: Fix PocketBook losing net access
Doing the `isOnline` check (`socket.dns.toip("dns.msftncsi.com")`)
without having internet connectivity (`!isConnected`) results in the
`isOnline` check never succeeding again even if connectivity is later
acquired. This is most likely caused by /etc/resolv.conf only being
parsed once - https://sourceware.org/bugzilla/show_bug.cgi?id=984, an
issue that was fixed in glibc 2.26 (PocketBook firmware U740.6.8.2461
has glibc 2.23).

This fix works around the problem by checking if we have a default route
first before even attempting to check `isOnline`. If we don't, then
`isOnline` is (almost) guaranteed to fail anyway.

We could alternatively check `isConnected` instead, but that only checks
wireless connectivity on many platforms, and we could have internet
access via USBNet instead. Checking for the default route via any
interface should work reliably for both wireless and USBNet
connectivity.

Another alternative fix is to add a fallback nameserver to
/etc/resolv.conf like we do for the Kobo platform [1]. Unfortunately,
this fix would not work in the following (rather common) scenario:

1. PocketBook boots, connects to WiFi
2. KOReader starts, /etc/resolv.conf looks all right, no fallback needed
3. PocketBook goes to sleep, disconnects from WiFi, clears resolv.conf
4. PocketBook wakes up, stays disconnected
5. KOReader user does a Wikipedia lookup, networking freezes

[1]: https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224

Fixes: https://github.com/koreader/koreader/issues/10183
Related: https://github.com/koreader/koreader/issues/6421
2024-04-07 21:58:12 +02:00
Denis Malinovsky
6cc970dbb4
Do flashui refresh for first display of History page (#11603)
This fixes ghosting for color Pocketbook devices

Fixes #11602.
2024-04-06 13:07:34 +02:00
hius07
c415aea67e
File manager: fix classic mode item font size (#11626)
Closes #11625.
2024-04-05 19:03:05 +02:00
Frans de Jonge
601925ab87
[minor] CSS tweaks: fix typo cellpading → celpadding (#11618) 2024-04-04 16:02:02 +02:00
Frans de Jonge
ec54afcc0d
[minor] ReaderStyletweak: fix typo (#11616) 2024-04-04 16:01:49 +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
SomeGuy
f6588e95e8
ReaderHighlight: ~~strikeout~~ → Strikethrough (#11619) 2024-04-04 11:22:36 +02:00
Frans de Jonge
b1a80921ad
Revert "ReaderPaging: enable Kindle page-turn animations (#11424)" (#11617)
This reverts commit ee7c3ab551.
2024-04-03 19:04:27 +02:00
Frans de Jonge
b9261e0245
[i18n] Font UI fallbacks: insert replacement characters with template for Weblate compatibility (#11614)
Added in <https://github.com/koreader/koreader/pull/8722> and unproblematic for the past two years, but Weblate has now decided to complain about it to the extent of disabling translations:

> Error message
String contains control character: 'If some book titles, dictionary entries and such are not displayed well but shown as \ufffe\ufffe or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.\nFonts for many languages can be downloaded at:\n\nhttps://fonts.google.com/noto\n\nOnly fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.'
2024-04-03 17:55:41 +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
SomeGuy
fbd3e822fe
ReaderView: increase underline thickness (#11586)
Closes #11581.
2024-03-29 09:38:31 +01:00
Denis Malinovsky
501cba6ebe
PocketBook: remove unused color_saturation parameter (#11597)
Bumps base for https://github.com/koreader/koreader-base/pull/1751

Includes several build system improvements as well
2024-03-29 09:36:53 +01:00
dkabot
ee7c3ab551
ReaderPaging: enable Kindle page-turn animations (#11424)
Fixes #11423.
2024-03-26 14:49:17 +01:00
Frans de Jonge
ca8e9352ba
[i18n] Add en-GB and Romanian translation to UI (#11577)
* Add en_GB translation to UI

Follow-up to https://github.com/koreader/koreader-translations/pull/167

* Uncomment Romanian
2024-03-20 23:41:32 +01:00
Denis Malinovsky
f4a8514545
ReaderTypography: update menu features symbols for Russian (#11570) 2024-03-20 23:24:49 +01:00
poire-z
67cd647d1a
ReaderToc: add option to show chapter lengths (#11546) 2024-03-20 10:09:44 +01:00
Frans de Jonge
9387fcd2d0
[fix] ReaderLink: fix copy link (#11569)
Fixes #11567.
2024-03-18 17:36:01 +01:00
hius07
bb98cbf612
ReaderStatus: update status modification time (#11568)
In the "End of the book" action.
Closes #11564 (No idea how we got a book without modification time but the time stamp must be updated in any case)
2024-03-18 17:35:35 +01:00
hugleo
424fa9b6fd
ReaderView: ensure that the pan zoom direction is not nil (#11557)
Fix gif and web files not opening: https://github.com/koreader/koreader/pull/11425#issuecomment-2002164851
2024-03-17 12:13:04 +01:00
Jo Van Bulck
4d19ce24ed
Dictionary: Fix download message when connection fails (#11548) 2024-03-14 16:58:47 +01:00
poire-z
9a84755e56
Wikipedia EPUBs: add settings for include/highres images (#11544)
Allows setting a default answer to the "Include image"
and "slightly higher quality images" questions when
saving a Wikipedia article as EPUB.
2024-03-14 00:16:52 +01:00
poire-z
191ef2b4c0
Book style tweak: add more suggestions in "CSS ≡" (#11533) 2024-03-14 00:16:09 +01:00
hugleo
b026f84949
ReaderZooming: make auto-crop default be page content (#11438) 2024-03-14 00:15:10 +01:00
SomeGuy
ac0483bfce
Screensaver: 0% only on first page, 100% only on final page (#11541)
Fixes #11516
2024-03-13 21:22:33 +01:00
hius07
5414858b74
Menu widget: fix item property name (#11534) 2024-03-12 08:51:33 +02:00
poire-z
0eaa2d8248 Wikipedia: tweak EPUB css to force epub.css look
Include in the EPUB stylesheet most of our epub.css
tweaks, so we get our expected styling even when
html5.css is used as the default stylesheet.
(Users liking the "web page" look can still get it
by enabling some of our existing style tweaks.)
2024-03-10 17:06:14 +01:00
poire-z
70e6f4ce09 util.prettifyCSS(): handle better :is() and similar 2024-03-10 17:06:14 +01:00
poire-z
e3d7669588 Style tweaks: add tweak to avoid some presentational hints 2024-03-10 17:06:14 +01:00
poire-z
9467034f3f ReaderTypeset: tweak Style> menu logic and defaults
- Reword and document most menu items.
- Handle internally two default styles, one applying only
  to FB2/FB2 books, and the other to all other formats.
- Also don't reset the stylesheet to epub.css when
  toggling Embedded Styles to off.
2024-03-10 17:06:14 +01:00
hius07
6f896e9383
ReaderFooter: chapter progress bar (#11505) 2024-03-10 08:05:30 +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
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
zwim
58b3367d18 anti alias rounded corners in UI 2024-03-06 22:11:48 +01:00
NiLuJe
dd8560cef8
Input: Don't let wacom pens clobber the slot of the next contact (#11520)
If there's only one contact, we won't get an ABS_MT_SLOT, so we need to
make sure we fall back to the main finger slot once we've caught a tool
switch.

Also, move the dedicated pen slot further away, so it has zero chance of
being detected as a potential buddy contact to a finger contact.

Fix #11514
2024-03-06 08:26:48 +01:00
hius07
7edb64ecee
Upper menu: fix generating the menu (#11513)
revert all changes to the upper menu made in #11495
2024-03-05 07:38:06 +02:00
hius07
ec98c6334b
MenuSearch: open upper menu when needed only (#11495) 2024-02-28 07:29:33 +02:00
hasezoey
ade1daca3a
FileChooser: "percent - unopened - finished last" consider status "complete" as 100% (#11472)
re #11369
2024-02-27 20:52:37 +01:00
hius07
72a6fa1e64
FileManager: less lfs calls when selecting files (#11476) 2024-02-19 08:03:12 +02:00
hius07
db2336440f
Alt status bar: custom metadata support (#11463) 2024-02-18 08:06:50 +02:00
Hzj_jie
d4c78aaa4f
Kindle oasis has no ambient brightness sensor (#11456)
I did not notice an ambient brightness sensor, nor adaptive brightness feature. (Ref: https://www.geekwire.com/2016/kindle-oasis-review-amazons-premium-e-reader-use-premium-features/)

Was it previously wrongly configured?
2024-02-17 14:09:48 -08:00
hugleo
52fae11da7
ReaderView: ensure pan zoom mode on document open (#11425)
When we open the document for the first time, the pan
positions are not being applied. If I use the bottom-to-top
mode we should see the bottom first, but the top is being
shown instead.
2024-02-17 01:34:40 +01:00
hugleo
ef0077df23
ReaderPaging: fix offset issue on next page in pan zoom (#11408) 2024-02-17 01:31:31 +01:00
hugleo
041117cbb6
ReaderZooming: revert Autocrop fix (#11325)
From f990937f9f.
2024-02-17 01:26:21 +01:00
hasezoey
76980098ec
FileChooser: add new sorting method (#11369)
"percent - unopened - finished last"
(ie. 90% > 50% > 0% > unopened > 100%)
2024-02-17 01:22:06 +01:00
hius07
5d4747c593
FileManager: less lfs calls (#11452)
Use item info provided by FileChooser.
Also fix showing PathChooser with invalid path,
and fix issue when opening non-supported files.
2024-02-17 01:17:59 +01:00
poire-z
76bf85738a Style tweaks: add inpage foootnote classnames and a tweak 2024-02-17 00:33:03 +01:00
poire-z
d77b511849 bump crengine: text selection and footnotes fixes and tweaks
Includes:
- LvDocView: allow setting custom title/authors/series
- elementFromPoint(): fix possible crash when float at end of document
- Non-linear fragments: fix generic handling on erm_final
- DrawBorder: fix bottom border inset/outset drawing
- getSegmentRects(): allow segments to include images
- getRangeText(): allow gathering images
- Allow standalone image in link to trigger in-page footnotes
- ldomDocument::render(): avoid uneeded deserialization on each page turn
- lvtinydom: add ldomNode::getAllInnerAttributeValues()
- LVFootNote: avoid retrieving internal CompactArray object
- In-page footnotes: allows for multiple id= inside them

cre.cpp:
- rename overrideDocumentProp() to setAltDocumentProp()
- isLinkToFootnote(): handle image-only links
- text selection functions: add includeImages param
2024-02-17 00:33:03 +01:00
poire-z
0506ffe289
HttpInspector: new plugin for developers to inspect KOReader (#11457)
Can be used to inspect the state of the objects in
a running KOReader.
It can also be used to execute actions (like the ones
available to associate to a gesture) with HTTP requests
from a remote computer/devices/gadgets.
The TCP server side is provided either with a new
ZeroMQ StreamMessageQueueServer (thanks bneo99),
or with a LuaSocket based SimpleTCPServer.
Minor UIManager tweak to avoid uneeded inputevent
when such a ZeroMQ module is running.
2024-02-16 12:24:31 +01:00
Frans de Jonge
bdd475f55f
[i18n] ReaderSearch: add translation context to "All" button (#11352)
Cf. https://github.com/koreader/koreader/pull/11313/files#r1439406753
2024-02-08 17:40:41 +01:00
hius07
b8090c641c
Minimize DocSettings:open() calls (#11437) 2024-02-07 10:35:52 +02:00
hius07
c3bb2263b7
DocSettings: check legacy history location only once (#11439) 2024-02-06 08:44:37 +02:00
hius07
962477e7c6
TextViewer: make find result bold (#11427) 2024-02-03 10:32:33 +02:00
zwim
f836f6a237
Clear UI leftovers before doing an OTA-install, add unmovable to InfoMessage and ConfirmBox (#11412) 2024-01-29 22:37:32 +01:00
hius07
38a14ff3a0
PathChooser: fix calling Folder shortcuts (#11367) 2024-01-26 22:03:28 +01:00
hius07
d94b819eb1
CoverBrowser: use bookinfo cache in Classic mode (#11404)
Getting bookinfo from the cache db is much faster than opening a book, let's use it in Classic mode too.

With fallback if no metadata available.
2024-01-26 22:01:45 +01:00
NiLuJe
a8a944cbaf ScreenSaverWidget: Simplify the setDirty call
No need for a closure, there's no dimen involved.
2024-01-21 06:42:09 +01:00
NiLuJe
39744d7642 TouchMenu: TouchMenuItem's UnderlineContainer should probably have its own dimen object
The coordinates could wonky otherwise, as TouchMenuItem is an
InputContainer.
Mostly harmless in practice as that UC is its main widget.
2024-01-21 06:42:09 +01:00
NiLuJe
4785df48a9 PRSTux: Disable OTAs
We haven't been offering any for years, and I've just killed zsync
support there anyway.
2024-01-21 06:42:09 +01:00
hius07
925aa728c9
Fulltext search: action to show last findall results (#11388) 2024-01-20 10:00:21 +02:00
NiLuJe
82bf8bf379 ScreenSaver: Properly exclude macOS resource forks again
The previous check was inlined in the dir walk, so it always saw a
relative path.
Here, it gets an absolute one instead, so act accordingly ;).

Fix #11390
Regression since #11056
2024-01-19 21:11:02 +01:00
NiLuJe
e5cb24a891 ConfigDialog: Simplify the previous fix
Geom's intersectWith & friends have nil guards in place since #7664,
so the insane workaround is completely superfluous.
2024-01-19 21:11:02 +01:00
NiLuJe
19ed35e59c ConfigDialog: Don't enforce 0x0 dimensions on initial display
FrameContainer now behaves like other widgets, and no longer re-computes
dimensions in paintTo *if you provide a dimen*.
Since we do here, for.... reasons I'm not entirely sure still make any
sense, make sure we actually compute valid dimensions,
instead of an empty rect from Geom:new ;).

Fix #11389
2024-01-19 21:11:02 +01:00
NiLuJe
90ae4acca6 Chore: Review FrameContainer constructors for shared dimen objects
Nothing else seems problematic, this is mostly just cosmetic sanitization
around Geom objects.
2024-01-19 00:08:10 +01:00
NiLuJe
65e22ceafc Widgets: Fix a bunch of regressions after the FrameContainer change in #11364
FrameContainer now preserves its self.dimen, which means it cannot be
shared with another widget or container that might also modify it during
painting ;).

Fix #11370
Fix https://github.com/koreader/koreader/pull/11364#issuecomment-1894454657
Fix #11379
2024-01-19 00:08:10 +01:00
NiLuJe
5e4d182608 Fold the debug logging flip inside the "Report a bug" entry
Also, implement a Notification source that will *always* be shown,
regardless of user preferences, and use it here.
2024-01-19 00:08:10 +01:00
NiLuJe
72250daba8 UI: Add a verbose debug logging checkbox next to "Report a bug"
@hius07 mentioned something to that effect a while back, makes sense.

Unlike the set of checkmarks in the dev settings, this one flips both
debug + verbose at once, *and* asks for a restart for framebuffer's
sake.

Also update the "Report a bug" spiel to request verbose debug logs.
2024-01-19 00:08:10 +01:00
NiLuJe
55171212c3 Misc: Forgot to update that comment given the latest VirtualKey tweaks
;).
2024-01-19 00:08:10 +01:00
poire-z
43d36b2ea9 TextBoxWidget: allow showing bits of text in bold
Allow for embedding "tags" (invalid Unicode codepoints)
in the text string to trigger some text formatting:
for now only bolding some parts of text is possible.

Use it with fulltext search "all results" to highlight the
matched word (instead of the previously used brackets).
2024-01-18 12:51:10 +01:00
poire-z
487e5f667a ReaderThumbnail: prevent standby during thumbnails generation
PageBrowser could have strange issues on devices with
aggressive autostandby (ie. failure to read data
from subprocess).
2024-01-18 12:51:10 +01:00
hius07
43831236ce
CoverBrowser: doc_settings cache improvement (#11360) 2024-01-17 09:58:21 +02:00
cookiebit
e3b4cbe71a
Virtual keyboard: add Scandinavian layouts (Norwegian, Swedish & Danish) (#11365) 2024-01-16 22:33:15 +01:00
Andrei Ignatev
4c503b0f11
Frontlight widget: add left button as close key on hasFewKeys devices (#11376)
Fixes issue #8023
Related to issue #4029

The fix takes exactly the same approach as other PRs like #6195 to add some usability to devices with few hardware keys. The front-light widget can now be closed using the left key on the d-pad.
2024-01-16 22:17:26 +01:00
NiLuJe
3b129e2ada Chore: Fix a few more widgets that were breaking dimen refs in
paintTo...
2024-01-16 01:26:48 +01:00
NiLuJe
d33bb0452c VirtualKeyboard: Simplify our top-level dimen handling
Make sure it tracks the right widget, and stays accurate post-paint,
by fixing FrameContainer's paintTo method *not* to break the dimen ref...
2024-01-16 01:26:48 +01:00
NiLuJe
259b4ac950 VirtualKeyboard: Try to include the padding in the key's hitbox
Followup to 40d27ac3e5
Re: #11357
2024-01-16 01:26:48 +01:00
NiLuJe
40d27ac3e5 InputDialog: Don't close the VirtualKeyboard when you tap inside a key's
*border*

That's going to be the sneaky bug to beat for 2024, lol ;).

Fix #11357
2024-01-15 04:29:09 +01:00
NiLuJe
5bd78ab3b4 ReaderHighlight: Don't try to close a non-existent widget in onClose 2024-01-15 04:29:09 +01:00
NiLuJe
c529c1cce3 Kindle: Log the args from WakeupFromSuspend & ReadyToSuspend 2024-01-15 04:29:09 +01:00
NiLuJe
d205c72119 ReaderStatus: Fix some more lifecycle issues in onEndOfBook
Delay anything that attempts to destroy the current document instance if
we're inside an event handler.

Re: https://github.com/koreader/koreader/issues/11147#issuecomment-1891005869
2024-01-15 04:29:09 +01:00
NiLuJe
588bf38c84 Kindle: Log the suspend/wakeup source
We currently don't do anything with it, but this might help someone come
up with fancier smartcover handling, like we do on Kobo...

Simplify the fake events w/args checks:
We can just hitcheck the table directly, no need for another hash

Also catch ExitedSS on Kindle.
And, again, dn't do anything with it ;p.
2024-01-15 04:29:09 +01:00
hius07
c4e9e6bc51
filemanagermenu: fix classic mode items per page (#11346) 2024-01-13 14:45:53 +01:00
hius07
0ceb88a9a3
Fulltext search: all entries in entire document (#11313) 2024-01-13 12:58:05 +02: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
NiLuJe
dcfcc81dcf Android: Don't forget to call Generic.exit on Device:exit ;).
Fix #11345
2024-01-13 02:03:10 +01:00
NiLuJe
0f194d88b9 OTAManager: Slightly less cryptic error on connectivity issues
(On either end).

Re: #11258
2024-01-13 02:03:10 +01:00
NiLuJe
de3e420c1e DocSettings: Abort early if doc_path is nil or empty in findSidecarFile
Regression from #11020 compared to the previous getSidecarFile behavior
2024-01-13 02:03:10 +01:00
NiLuJe
8968c41070 i18n: Some more unicode escapes => raw bytes shenanigans
Fix #11332
2024-01-13 02:03:10 +01:00
NiLuJe
871ebb0573 Screensaver: nil guard lastfile in cover mode
`hasSidecarFile` assumes you're feeding it a string.
Plus, that check was super funky anyway.

Fix #11336
2024-01-13 02:03:10 +01:00
sonix-github
87915de32b
Fix missing diacritics on first row of Slovak keyboard layout (#11343) 2024-01-12 22:19:16 +01:00
NiLuJe
c97d20cd24
Chore: Make sure we always pass a rect to fb:refreshFull (#11307)
* UIManager: Init a full Geom on region-less refreshes in _refresh
* Never call refreshFull with no arguments
  I got rid of the low-level nil guards, because UIManager itself guarantees that it can never happen
* Bump base (https://github.com/koreader/koreader-base/pull/1718) (fix #11303)
* Kindle: Re-enable HW dithering on the Scribe
  Now that the underlying issue is fixed in base ;).
2024-01-12 21:23:23 +01:00
NiLuJe
18c17829b7
Input: Simplify input slot storage alloc (#11296)
* Input: Harden setCurrentMtSlotChecked
  The current implementation was assuming that the only case where we
  might be missing slot storage was for the *first* contact point,
  given that ABS_MT_SLOT is (if all goes well) guaranteed to be present
  and come first for every subsequent additional contact points.
  While this works just fine in practice, we can simplify and generalize
  the check by just checking if we've actually recorded the requested
  slot, even if it's not the first contact point.
  The hit check is possibly ever so slightly faster than the length
  computation, to boot.
* Input: Handle snow_protocol devices with newer hardware revisions that do *NOT* need the snow quirks.
  If a sane input frame is detected, the snow quirks will be disabled at runtime, ensuring sane behavior.
  Given the extremely non-standard behavior of the snow quirks, this is fairly easy to detect,
  as a snow device will *never* emit EV_ABS:ABS_MT_TRACKING_ID:-1, so if we catch one, it's not snow ;).
  (We've had reports of this on a Clara HD, FWIW)
2024-01-12 20:40:49 +01:00
zwim
2c33fc6576
Reader: Do less work on same-orientation non-gyro rotations (#11297)
Namely, don't recompute layouts, as they do not change.
(The gyro codepaths were already doing something similar.)

* Keep ConfigDialog, FileManagerMenu & ReaderMenu open on rotation.
  (In practice, only ConfigDialog is affected, as *Menu doesn't handle the rotation event.)
* Plugged an instance leak in the aforementioned Menu classes.
* Unify behavior & code with the gyro codepaths.
2024-01-12 19:13:44 +01:00
hius07
ea9ef6781c
CoverBrowser: adjustable mosaic grid (#11232) 2024-01-12 08:13:50 +02:00
mergen3107
4a9473ed45
Kindle Oasis 1,2,3, Scribe: fix startup orientation (#11277)
Closes #11269
2024-01-11 13:22:17 +01:00
hius07
4ddc0f2ef8
FileChooser: fixes (#11300) 2024-01-10 20:27:09 +01:00
NiLuJe
9826615f06
i18n: Don't use Lua unicode escapes (#11330)
Something in the gettext/weblate pipeline doesn't like it...

These are real unicode codepoints, not custom nerdfont ones, so just
render the actual glyph instead of escaping it.

Fix #11328

Cf. #10845.
2024-01-10 20:24:21 +01:00
NiLuJe
cc52c022dc Notification: Take three, take the guesswork away by making every
specific mask visible
2024-01-09 17:24:16 +01:00
NiLuJe
4a15dce3e4 Kindle: Disable HW dithering on Scribe
Pending the actual fix from
https://github.com/koreader/koreader-base/pull/1718 that'll hit after
the release.
2024-01-09 17:24:16 +01:00
NiLuJe
3131475e39 Notification: refactor settings
Simplify the code, because the bit trickery was fairly nasty to follow.
KISS: flip one value at a time, either in or out.

Actually allow flipping *all* of the things via the UI, to help track
what the hell is actually happening when you touch a button.

Make some of 'em radio to make it clear when flipping one might affect
the other(s).

Brought on by https://www.mobileread.com/forums/showthread.php?t=358166
2024-01-09 17:24:16 +01:00
Mihai Vasiliu
5d2a441064
Add viewport for PB743K3 (#11302)
The bezel covers a couple of pixels of the screen, so adjust not to show content under the bezel.
2023-12-29 17:41:53 +01:00
mergen3107
63329569eb
[android] toggle warmth on onyx devices (#11275) 2023-12-28 12:09:42 +01:00
mergen3107
6c85547ce6
Add HW dither on Kindle Scribe (#11292) 2023-12-28 11:24:15 +01:00
hius07
3533356ffd
filemanagerhistory: fix untranslated strings (#11282) 2023-12-28 07:47:56 +02:00
mergen3107
4c2fc1eb81
Kindle Scribe: fix touch input (#11285) 2023-12-27 23:06:18 +01:00
mergen3107
57cbde5901
[plugin] Add folder check in move-to-archive (#11262) 2023-12-27 20:45:16 +01:00
hius07
7a421ea3ab
Fix "Open next file" (#11272) 2023-12-27 08:45:52 +02:00
hius07
b949d07f4f
filemanagerbookinfo: proper text_type of description (#11260) 2023-12-25 07:40:13 +02:00
NiLuJe
33b54f5574
Kindle: Add a hasLightSensor devcap, and use it in the AutoFrontlight plugin (#11255)
Add the Scribe to the list while we're there
2023-12-24 17:15:30 +01:00
hius07
042a529fab
File manager: fix height of menu widget (#11251) 2023-12-22 08:01:11 +02:00
hius07
5a4e70a19d
History, Collection: title bar in FM style (#11243)
These changes make the title bar in File manager, History and Collection windows of the same height.
The items and book covers thumbnail dimensions in Mosaic and Detailed list display modes are now equal, and up/down scaling of the thumbnails is not needed when switching between File manager, History and Collection.
2023-12-19 09:22:53 +02:00
hius07
bf59f53e18
Folder shortcuts: speed up (#11221) 2023-12-17 08:26:57 +02:00
NiLuJe
675f5a062f Dispatcher: Allow custom intensity/warmth gesture to be setup in gesture
distance mode, like the default edge swipe, and not only with a fixed
increment.

Document the behavior in a slightly less confusing way.
2023-12-17 01:03:10 +01:00
zwim
c30c1ff11f DeviceListener: Rejig calculateGestureDelta algorithm
Get rid of the silly precomputed tables, and do More Maths(TM) instead!
Thanks to @zwim for the magic sauce ;).

Minor simplification of the API while I'm in there, and unify the warmth
computations, do everything in the native scale (much like what
effectively happens for intensity) to workaround the silly public API
being an unhelpful PITA, ensuring consistent & effective changes.
2023-12-17 01:03:10 +01:00
NiLuJe
a2e0642998 Cervantes: Make sure the warmth scaling is accurate
For some mysterious reason, we init fl_warmth_max to 100 on Kobo &
Cervantes, despite this being the case on absolutely none of them.

TL;DR: We update it according to nl_max during init, but this was
missing on Cervantes.
2023-12-17 01:03:10 +01:00
NiLuJe
bc01394f8f SortWidget: Abbreviate the pagination text
Helps avoid truncation, given the way the widget is currently built.
Closes #11222
2023-12-17 01:03:10 +01:00
NiLuJe
ff58ac7a65 DeviceListener: Handle non-gesture warmth increment in the native scale
Re: #11220
Followup to #6468
2023-12-17 01:03:10 +01:00
hius07
f765fe3070
Screenshot: set as book custom cover (#11227) 2023-12-16 10:36:57 +02:00
hius07
f4a5a2b60a
TextViewer: add dialog to set font size and justify text (#11210) 2023-12-14 07:50:54 +02:00
poire-z
fe02b83b6a
ImageViewer: menu to invert rotations and set auto rotation (#11206)
Add some menu items under Screen>Rotation to allow inverting
the default rotation of ImageViewer, and to auto-rotate for
best fit on launch, so landscape images are auto-rotated to
the preferred rotation.
2023-12-12 13:24:31 +01:00
hius07
aabd6d7a26
File browser, Collection: improve group actions (#11178)
Maintain correct records in History and Favorites when moving/deleting folders or group of files.
Optimize Collection module to minimize storage requests.
2023-12-10 08:05:34 +02:00
Frans de Jonge
13a521c398
AppImage: remove hasMultiTouch = no (#11212)
SDL supports multitouch since https://github.com/koreader/koreader-base/pull/1599
2023-12-08 10:12:22 +01:00