Commit Graph

6681 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)
 

Author SHA1 Message Date
NiLuJe 7210fb478d
Faster blitting @ BB8/BBRGB32 when no processing is needed (#4847)
* Pickup the eponymous blitting performance tweaks from koreader/koreader-base#878
* Cleanup BitOpts usage (require & cache)
* Unify oddness checks (MOD -> AND)
* Enforce the native Portrait orientation on Kobo (except @ 16bpp, i.e., KSM w/ 8bpp swap disabled), to allow for faster blitting when unrotted.
* Switch CRe BB to 32BPP on color screens
* Minor cleanups
5 years ago
NiLuJe fe3fc78171 Move AutoSuspend menu to the Plugin itself 5 years ago
NiLuJe 1eba95d87f Bump base to pickup cre.cpp changes for font sizes 5 years ago
NiLuJe 04f5bc7823 Remove the Aura SE viewport
This feels somewhat arbitrary and potentially unneeded,
and it'll prevent full blits, so, off it goes.
5 years ago
NiLuJe 9ecc2dd119 There's no viewport on the H2O²
Fix #4834
5 years ago
NiLuJe 9be3455ccc Don't crash when sizeUtf8Text is called on a nil
By returning a table with the right fields instead of nil.

Re #4845
5 years ago
NiLuJe abbb3ea747 Increase granularity of the font size fine tuning button
Should allow us to get at the full 12 to 30 range when scaled on a 300dpi
device (29 -> 72 or 26 -> 64 w/ a dpi override).
5 years ago
NiLuJe 783c3fd7dc Allow toggling sleepcover handling from the UI 5 years ago
NiLuJe 860b4b24a0 Allow setting the autosuspend timeout from the UI
Fix #4179
5 years ago
NiLuJe 32c9ea74a6 Ignore the accelerometer while we're sleeping on Kobo
It might cause unwanted wakeups, and even it it doesn't, it just feels
and looks stupid ;).
5 years ago
Frans de Jonge 83cdb9cb9a
[fix] MenuSorter: don't add empty menu item (#4848)
Fixes #4845.
5 years ago
poire-z b98ee4583b Footnote popups: fix crash when used on some links
Fix crash when dismissing the popup when the link was
detected as "not coherent".
5 years ago
poire-z a47f3a2765 ReaderRolling: proper refresh when toggling scroll/page mode
When toggling between scroll and page modes multiple
times, _gotoXPointer() could find the xpointer to be
already positionned and avoid calling setDirty() (so
not enqueuing a whole screen refresh). But the page
will be slightly moved to account for the top margin
disappearing. We need that whole screen refresh in
such cases, so ensure one is enqueued.
5 years ago
poire-z b7b4cdd2a7 ConfigDialog: fix possible crash (#4838)
When one has set a default for toggles thad don't have 'values' in
their definitions (possibly only Orientation).
5 years ago
Frans de Jonge 4e17de371d
[fix, Android] Bump base to fix Android zlib LDFLAGS (#4837)
Fixes https://github.com/koreader/koreader/issues/4833
5 years ago
poire-z 5f13e68966
bump crengine: line-height: reworked implemenation (#4835)
Includes:
- Revert "line-height: fix handling and inheritance"
- Revert "line-height: switch base from 16 to 256 for more granularity"
- CSS: parse "normal" keyword length
- line-height: reworked implemenation for better conformance
- 2-pages mode: fix middle margin sizing
5 years ago
poire-z cfd562697f
Fix Color rendering toggle not toggable (#4836)
Also refresh screen when toggling.
5 years ago
Frans de Jonge 54b0e85bdd
Bump base for trying more SDL2 library names (#4829)
See https://github.com/koreader/koreader/issues/4826#issuecomment-475043234

Also some Makefile/CMake sanity/cleanup/style/refactoring.

Includes:

* [build] Move Android ZLIB_LDFLAGS to thirdparty/zlib https://github.com/koreader/koreader-base/pull/870
* [chore] Update CMake to modern style with lowercase commands https://github.com/koreader/koreader-base/pull/872
* [fix] Add util.ffiLoadCandidates to try multiple SDL2 library names https://github.com/koreader/koreader-base/pull/873
* [fix] Return fail status for SDL https://github.com/koreader/koreader-base/pull/874
* [chore] Makefile: declare all phonies https://github.com/koreader/koreader-base/pull/875
* [chore] Remove luajit-clean target https://github.com/koreader/koreader-base/pull/876
* [chore] CMake kpvcrlib convert remaining tabs to four spaces https://github.com/koreader/koreader-base/pull/877
5 years ago
Galunid 5f44ef5dad [feat] Kindle suspend using lipc (#4825)
Fixes problems with making Kindle go to sleep using menu or gesture manager action.
5 years ago
Frans de Jonge d58774b875
Bump resources/fonts (#4828)
Includes https://github.com/koreader/koreader-fonts/pull/5#event-2218708024

Fixes issue detailed in https://github.com/koreader/koreader/pull/4744#issuecomment-473113760
5 years ago
Frans de Jonge 2f65fb94ec
[Android, UX] Add Device:openLink() implementation (#4824)
Fixes https://github.com/koreader/koreader/issues/4821

Same as https://github.com/koreader/koreader/pull/4822

Thanks to @pazos who implemented the Android backend, see https://github.com/koreader/android-luajit-launcher/pull/133
5 years ago
Frans de Jonge b1ed2838c8
[UX] Add Device:openLink() stub for Linux SDL (#4822)
References #4821.
5 years ago
Frans de Jonge 728bb187fa
[UX] Gesture manager: add two-finger swipe left and right (#4815)
Also add Device:hasMultitouch() to control whether the configuration menu is shown.

Cf. #4727.
5 years ago
Frans de Jonge 523be5e7d9
[fix] Makefile: declare all phonies (#4819)
It's generally working as expected at the moment because you're unlikely to have a file named `clean`. But if you were to create a file named `all` or `clean` you could have a pretty difficult time figuring out why nothing's happening anymore.

Pointed out by https://github.com/mrtazz/checkmake which I ran out of sheer curiosity.
5 years ago
Martín Fernández bc9b43aa64 [Android] add support for likebook mars/muses (#4818) 5 years ago
poire-z 83da4d116e
bump crengine: Harfbuzz light & line-height fixes (#4816)
Includes:
- Harfbuzz light: disable additional HB features
- line-height: switch base from 16 to 256 for more granularity
- line-height: fix handling and inheritance
- [CI] cppcheck: remove --quiet
5 years ago
NiLuJe 003de939b0 [fix] Properly account for MuPDF feeding us premultiplied alpha (#4807)
* Properly account for MuPDF feeding us premultiplied alpha

* Bump base to pickup necessary backend changes

Also includes a bunch of CMake refactoring
(https://github.com/koreader/koreader-base/pull/865
https://github.com/koreader/koreader-base/pull/867
https://github.com/koreader/koreader-base/pull/868)
5 years ago
Frans de Jonge 59d8a1852f
[fix, lang] ReaderGesture: toggle highlight action to cycle (#4809)
I overlooked this until I noticed it on Transifex today.

See https://github.com/koreader/koreader/pull/4791#discussion_r265546245

Also changing the internal name because for something that's only been in one or two nightlies there's no point in prematurely introducing legacy settings.
5 years ago
Frans de Jonge 9eca893ceb
[build] Bump base to make ninja the default CMake generator when available (#4808)
The difference for builds from scratch is negligible, but for rebuilds (i.e., for us hackers & the CI here in front) it should bring a speed improvement.

Automatic fallback to Make when Ninja is not available, or override with `USE_MAKE=1`.

You can (theoretically) choose your own generator with a sensible combination of `CMAKE_FLAGS` and `CMAKE_MAKE_PROGRAM`.

I also added `MAKE_FLAGS` and `NINJA_FLAGS`. That way you can easily pass `MAKE_FLAGS=-n` or `NINJA_FLAGS=-n` for a dry run, for example.

To switch you might have to run something like `make dist-clean USE_MAKE=1`.

Cf. https://github.com/koreader/koreader-base/pull/861, https://github.com/koreader/koreader-base/pull/862 and https://github.com/koreader/virdevenv/pull/34/files
5 years ago
poire-z b16aa79636
ConfigDialog ButtonProgress: black border on default item (#4805)
Make the default (user set, or KOReader's default) item
among the button progress squares shown with a black border.
5 years ago
Frans de Jonge e357165f17
[fix] GestureDetector: fix typo in ges_coordinate_translation_90 (#4804)
Fixes #4803.
5 years ago
Frans de Jonge f817bb5e0c
[fix] Bump base for blitbuffer fix & sdcv fix (#4801)
* blitbuffer.c: Oops, forgot a / 255 there... https://github.com/koreader/koreader-base/pull/859

* [fix] sdcv: apply utf-8 patch again https://github.com/koreader/koreader-base/pull/860
5 years ago
poire-z 454f14384b
Gesture manager: fix actions: Book cover, Book description (#4800)
Code removed from ReaderGesture and put into BookInfo where
it belongs, so we can just use Events.
Also convert description to plain text to not show HTML tags.
5 years ago
poire-z 6239d89022
Screensaver: fix crash when "Choose screensaver image" (#4799)
Just switched to use the friendly PathChooser instead of
FileChooser (which is more like a superclass and shouldn't
be used directly).
5 years ago
NiLuJe 645d41eda9
Add more granularity in line-height settings with CRe (#4785)
70 -> 130, in steps of 5 ;).
5 years ago
poire-z 2aa77a4879 Gesture manager: add actions: Book cover, Book description 5 years ago
poire-z 17f07e755f CoverBrowser: speedup "View full size cover"
It was doing a full document load to get the cover. It now does
the faster "only metadata" load.
Also move the trick of setting a default font in CreDocument, so
that all callers of document:loadDocument(false) benefit from it.
Prevent crash when no cover image is available (even if the cache
says it has one, the file may have been updated and doesn't have
it anymore).
5 years ago
poire-z c060595580
ConfigDialog: fix ButtonProgressWidget and some refreshes (#4793)
This internal ButtonProgressWidget widget was behaving
differently from all others (OptionTextItem, OptionIconItem
and ToggleSwitch) by duplicating some code from
ConfigDialog:onConfigChoose() instead of calling it directly.

While making it similar to others, I noticed that onConfigChoose()
did a full repaint, which was necessary for some settings to
be applied (ie: Contrast).
On CreDocument, this full repaint may cause some double drawing
on config changes (ie: Margins, drawing once after margin changes,
and then re-positionning to previous xpointer).
So, make the need for full repaint a condition on KoptOptions.
5 years ago
poire-z 9560bc2061
ConfigDialog: fix some gray mismatch in prev commit (#4797)
Remove gray underline on text items (font size items).
Adjust gray color of ButtonProgressWidget to match the
one of ToggleSwitch (just need to invert it, as it's
used to select button, which cause this color to be
inverted).
5 years ago
NiLuJe 2011cf1ad1 Various blitting related cleanups (#4789)
* Fix the "Enable debug logging" checkbox so that it properly disables "Enable verbose debug logging" when it gets disabled
* Avoid asking ImageWidget for alpha-blending when it's not useful
* Make ImageWidget's alpha-blending code-path double-check that alpha-blending actually is needed, and avoid it if possible
* In the same vein, only do alpha-blending in textboxwidget when absolutely necessary
* Prefer color constants over the gray() method, ensuring that they're part of the eInk palette

Depends on https://github.com/koreader/koreader-base/pull/853

Fix #4774
5 years ago
Frans de Jonge 1045bf8946
Bump base for a round of blitbuffer tweaks & fixes (#4795)
* https://github.com/koreader/koreader-base/pull/853

Prerequisite for #4789.
5 years ago
Galunid f637555d93 [UX] Gesture manager: add action - cycle default highlight action (#4791)
Cf. https://github.com/koreader/koreader/issues/4727
5 years ago
Frans de Jonge 930731d67c
[UX] Gesture manager: add a little notification to the wifi on action (#4786)
Fixes #4783.

Perhaps this should be in NetworkManager instead.
5 years ago
NiLuJe fdf92e13ea
Remove the Kobo-specific 16bpp JIT loopunroll tweak (#4784)
* Remove the Kobo-specific 16bpp JIT loopunroll tweak
It's now generic, and handled in ffi/blitbuffer.lua directly.
5 years ago
poire-z ce3d181e24
cre 2-pages: rename toggle to "Dual Pages" (#4788) 5 years ago
poire-z ad7dc86a43 CoverBrowser: fix a few "Extract and cache" issues
Ignore path and cover specs when last invoked menu
was History.
Fix InfoMessage size, broken by InfoMessage auto resize.
5 years ago
poire-z 766b199880 cre 2-pages view: allow extending selection across pages
Similar to what's been added for 1 page view, but just turn
one page instead of switching to scroll mode when reaching
top left or bottom right corners.
Also make the selection start xpointer more accurate by
getting them in onHold(), instead of possibly too late in
onHoldPan() where we have already moved.
5 years ago
poire-z 220b2dcfc2 cre 2-pages view: fix markers when following links and back
Show markers in the middle margin when target is in the right page.
5 years ago
poire-z 22bc9dacb5 cre landscape view: adds 1 page / 2 pages toggable
Adds a toggle switch in the Orientation bottom config menu to
allow showing 1 page or 2 pages when in landscape mode.
Previously, this was hardcoded to be in 2-pages modes only
in some circumstances (device resolution + user dpi).
5 years ago
poire-z 0948a4b656 cre: tweak current page highlights detection
No need to use current page and xpointers. We can use
'pos', in both scroll and page modes, as it is always
accurate to show the y of the current view.
5 years ago