[fix, UX] Fix slow keyboard when double tap not disabled
When double tap is not disabled (only ensured in ReaderRolling),
repeated key hits were slowed down by it. This ensures
Input widgets that temporarily overrides it to be disabled
are satisfied.
Multiswipes consisting of mixed straight and diagonal strokes are not dependable and too easy to mess up, but making them mutually exclusive seems to work out quite well.
When multiswipes are enabled, this fixes the long-standing complaint that swiping to open the menu could unintentionally trigger some light panning. With the introduction of multiswipes, this problem has become more noticeable.
Before multiswipes and the gesture manager this was impractical on touch-only devices, but no more!
Also includes some minor textual clarifications on some of the settings.
By scrolling last page a little bit further.
Also fix a few other scroll mode issues, all related
to doc_height not being updated (eg, in the middle of
a book, and doubling the font size, one would not
be able to turn pages and read the 2nd half of the
book...)
The idea of looking for highlights 1 page before and after
was not working when you have multiple small pages, and
some scroll mode view was actually showing 3 or 4 pages.
So, rework that by using absolute positions when looking
for highlights present in the scrolled view.
Reported by @poire-z, cf. https://github.com/koreader/koreader/pull/4640#issuecomment-466544922
Apparently it's natural for me to make the second swipe slightly longer than the first, so I never noticed a logic issue. I did notice that it seemed slightly harder to make 4-swipe multiswipes than I expected it to be, but those are not necessarily easy gestures to make.
The problem was that I needed to prevent obviously silly gestures like west west west east. In ignoring such duplication, what I accidentally did was to ignore any further movement west after the first multiswipe direction was detected, meaning that the following swipe east could still end up as a relatively western movement overall.
By simply updating the current multiswipe slot in case of the same direction, both problems are prevented. We'll never get the same direction twice, and X moves over to where it's supposed to be on the left.
Avoids a use-after-free in mupdf.scaleBlitBuffer
Fixkoreader/koreader-base#821
Thanks for the hint, @poire-z ;).
* As @poire-z suggested, the original unscaled bb should probably be free'd.
The concept is quite simple: stick a file on the OTA server named
something like `koreader-appimage-latest-stable` (by analogy with
`koreader-cervantes-latest-stable.zsync`), which contains nothing
but a filename.
The difference with the zsync update is that the link is then launched
in the user's browser (AppImage) or DownloadManager (Android, not yet
implemented).
* Android hasOTAUpdate = no for the moment
* Double-checks that the connection was successful, and forcefully kills WiFi if it didn't, to avoid leaving stuff in an inconsistent state.
Should fix#2183
* Limit the turnOffWifi call to devices where it might make some sense to
do
When we rotate to show a screensaver, restore original rotation *before* closing the ScreenSaver window.
And ensure closing the ScreenSaver *always* triggers a full update, no
matter the settings.
Fix#4621
This basic initial implementation offers an introductory message
on the first multiswipe with the option to disable, as well as
a few example multiswipes.
Custom multiswipes can be added to `settings/multiswipes.lua`.
The basic idea is that you gain an infinite amount of extra gestures,
although in practice you're probably mostly limited to your 16 basic
two swipe combinations and maybe a few three swipe ones.
* Flash a white screen before showing a screensaver image, to prevent
ghosting.
* Really limit the white flash to full-screen images
* Limit that behavior to eInk screens
(Not that clear() is implemented anywhere else, but, still).
* On Kobo, kill WiFi on startup if we detect an inconsistent state...
Untested, not terribly pretty.
The other solution is to slow down the Wi-Fi meny by doing the same
check for the "Wi-Fi connection" checkbox as in the later wifi_status
one...
* Don't enable auto_restore_wifi by default
It's liable to silently murder batteries for no good reason, given that
we prompt to enable WiFi by default when needed, and we otherwise have
no actual need to keep WiFi on in the background.
re #2215 (in particular, this directly contradicts @houqp in
https://github.com/koreader/koreader/pull/2215#discussion_r74696133 ;)).
* Various FocusManager related tweaks to limit its usage to devices with a DPad, and prevent initial button highlights in Dialogs on devices where it makes no sense (i.e., those without a DPad. And even on DPad devices, I'm not even sure how we'd go about making one of those pop up anyway, because no Touch ;)!).
* One mysterious fix to text-only Buttons so that the flash_ui highlight always works, and always honors `FrameContainer`'s pill shape. (Before that, an unhighlight on a text button with a callback that didn't repaint anything [say, the find first/find last buttons in the Reader's search bar when you're already on the first/last match] would do a square black highlight, and a white pill-shaped unhighlight (leaving the black corners visible)).
The workaround makes *absolutely* no sense to me (as `self[1] -> self.frame`, AFAICT), but it works, and ensures all highlights/unhighlights are pill-shaped, so at least we're not doing maths for rounded corners for nothing ;).
* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
* FileManager and co. (where appropriate, i.e., when covers are shown)
* Book Status
* Reader, where appropriate:
* CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
* Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
* ScreenSaver
* ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
(The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
either by switching the widget to nil when only a refresh was needed, and not a repaint,
or by passing the appropritate widget to setDirty.
(Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.
PS: (Almost 💯 commits! :D)
Panning to the bottom right corner (or top left corner) switches
to scroll mode and scroll the page forward (resp. backward) 1/3rd
of the screen.
One has to pan out of the corner to continue selection.
Panning again to that corner scrolls another 1/3rd of screen.
Page mode is restored when highlighting or dismissing the highlight
dialog, and a little marker is shown at where selection was started
so one does not get lost after all that scrolling and restoring.
Includes:
- Update french hyphenation pattern
- epub.css: update style for 'blockquote'
- DrawBuf: count nb of images and surface drawn
Adds Document:getDrawnImagesStatistics() to help deciding
if refresh with (possibly costly) dithering should be used
(on devices with HW dithering capabilities) with CreDocument:
when a page contains enough images to benefit from it.
Make this existing setting tunable with a menu item.
Also make the Page overlap and Highlight menus use a
checkbox, and their items grayed out when disabled.
Supported devices:
- Boyue T61 and *some* clones
- Boyue T62 and *some* clones
- Onyx C67
- Energy Sistem (which are in fact Boyue T62 clones). Was tested on a energy pro 4.
Others may work with the same controller too, but are disabled by default.
Requires https://github.com/koreader/koreader-base/pull/798
Requires https://github.com/koreader/android-luajit-launcher/pull/96Fixes#4373Fixes#1613 (supported devices will show the "full refresh rate" option under eink settings. Others won't)
Related #4228 (need to add support for this specific device to work)
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
WiFi handling is handled asynchronously (deferred to lipc), so this is a
bit clunkier than on devices where we handle WiFi ourselves...
But, basically, try to honor the menu callback when toggling WiFi so
that the status gets updated in the menu.
Fix#4472
Includes:
- (Upstream) Harfbuzz light: fix rendering of fallback font
- CSS: adds support for 'orphans:' and 'widows:' properties
Adds some Style tweaks related to Widows and orphans.