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.
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.
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
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.
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
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.
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).
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.
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).
* 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/853Fix#4774
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.
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).
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.
When following a footnote popup, the highlighted link
delayed clearing (when the link is hidden by the popup)
would clear the margin marker on the target page too early.
Includes:
- docToWindowPoint(): adds fitToPage parameter
- 2-pages mode: add and fix some functions
- 2-pages mode: tweak middle margin sizing
- Text rendering: fix words stuck when hyphenating on italic
cre.cpp:
- add a few functions useful with 2-pages mode
- fix docToWindowRect() to get truncated segments for
lines split onto 2 pages, for highlights and links
* Enforce Portrait rotation on the Forma *everywhere*, KSM included.
KSM is currently emulating a bogus rotation, which causes issues with
FBInk, but also happens to be insidiously quirky in weird corner-cases.
Partially resolves#4747. Will enable switching Wi-Fi on/off in the menu and getting the network status. However, a new Wi-Fi session lasts ~100 seconds and then terminates automatically, apparently, to save the energy. I believe it can be prolonged by some networking activity. Also it is not shut down if the auto suspension is disabled.