Commit Graph

6666 Commits (5f13e68966b5a9f1d8f9779345caf6df975169f6)
 

Author SHA1 Message Date
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
poire-z 1a4faad17c cre: Footnotes popup: fix markers disappearing too early
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.
5 years ago
poire-z 1945e181c5 bump crengine: 2-pages view tweaks, fix hyphenating on italic
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
5 years ago
NiLuJe 90df2f1997
Fix fb rotation on the Forma w/ KSM (#4779)
* 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.
5 years ago
Frans de Jonge 942f3ed5e4
[chore, CI] Update to Docker koappimage 0.1.3 for Ubuntu 16.04 (#4296) 5 years ago
Galunid 14c705f11b Enable addNote button, by letting it edit highlight (#4773) 5 years ago
NiLuJe 930286d3f5 Slightly prettier virtual keyboard (#4776)
Add a thin border around keys (square)
5 years ago
Frans de Jonge 80d7d1a530
[UX] Gesture manager: add action - show book information (#4777)
As requested by @ersi.

Cf. https://github.com/koreader/koreader/issues/4727#issuecomment-471766024
5 years ago
tob1az 89c17092e8 [feat] PocketBook: implement Wi-Fi connection toggling (#4775)
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.
5 years ago
Frans de Jonge 644e0d6440
[fix] Behave properly on start with shortcuts (#4772)
Regression caused by #4764. Fixes #4768.
5 years ago
Qingping Hou fc69257660 fix: auto dpi menu checkbox display (#4771) 5 years ago
poire-z 658f513512 [fix] cre: fix position and page number after window resize (#4754) 5 years ago
NiLuJe 7c2df53808
Update FBInk (#4765)
* Add a bit of logging before fbdepth calls, to make the progression
easier to grasp.
* Bump base (pickup FBInk update)
5 years ago
Frans de Jonge 294c92fdc7
[fix] FileManagerShortcuts: prevent interference with general Menu class (#4764)
The widget system doesn't really do multi-inheritance as well as it should at the moment. Instead of diving into the internals with release upcoming, this commit rewrites the shortcuts to behave better.

Also fixes an older bug in that changing the friendly name didn't actually do anything on first adding a shortcut.

Fixes #4763.
5 years ago
Frans de Jonge 2536cc2645
[fix] widget/menu: Don't propagate ShowGotoDialog to other widgets (#4761)
Fixes #4760.
5 years ago
Frans de Jonge 5ccc3ec352
[UX] Gesture manager: allow folder shortcuts as action in Reader (#4759)
Note that `self.ui:onClose()` properly closes open documents. There might be similar pieces of code around that don't do that.

Fixes #4755.
5 years ago