Commit Graph

63 Commits (e869b40625687b4e1f321b8a19cd3c4106a3de7a)

Author SHA1 Message Date
onde2rock 42a7dd4502 disable panning in page view_mode (#4265) 6 years ago
poire-z f9086a2ba9
EPUB links: show footnotes in popup, larger tap area (#4261)
Adds new options to the Links> submenu, for now only
available and used with CRE documents.
- Allow larger tap area around links
- Ignore external links
- Show footnotes in popup
- Show more links as footnotes

(This last item is mostly for testing and loosening the
footnote detection algorithm, and see how it would behave
with glossary-like links and inter glossary terms links.)

Fix distance computation from gesture position to link by
using segments.
Code for detecting if a link is a footnote is in cre.cpp, and
tweakable a bit with flags in ReaderLink:showAsFoonotePopup().

Footnotes HTML content is displayed by a new FootnoteWidget,
which uses MuPDF for its rendering.
From it, swipe south or tap outside to close, swipe to the left
to follow the original link and jump to the footnote location
in the book.

Also fix tap on highlights after the recent change to use segments
for displaying: use segments also when checking taps.
6 years ago
NiLuJe 0924b57877
Tweak/unbreak my CPUFreq experiment (#4119)
* Only switch to ondemand when we actually can, and when it's better than the current governor...
  This potentially leaves Mk.5 in the lurch, but there's no perfect solution there :/.

* Switch to UI for the unmark event of navigation hints markers
Might help on non-REAGL devices, and doesn't hurt there (re #3983).

* Switch SQLite DBs to WAL
Sounds nice in theory, behaves fine in practice.
6 years ago
NiLuJe 6835c18ee6
Re-exec startup script on Kindle/Kobo when an OTA update is processed on startup (#4062)
So that we may properly pickup potential updates to the startup script
itself.
6 years ago
poire-z 6877ade4fd
Remove cre cache file when deleting a book (#4022)
Store the cache file path in book settings, so we can
delete it too when deleting the book.
6 years ago
poire-z 07713be429
Adds "Better rendering of list items" to Style tweaks (#3968)
Alternate rendering of list items as block elements (instead of
inline/final).
Check the built DOM is still coherent with styles on stylesheet
change, and propose to reload the document if not. Also
invalidate cache on close in that case so a new DOM is built
at next opening.
ReaderStyleTweak: fix tweak css duplication; when globally
enabled, when disabling and re-enabling locally, the css would
be added twice to the final CSS.
Also adds !important to "sub_sup_smaller" tweak, and increase
its priority so it can override "font_size_all_inherit".
Adds CreDocument:getCacheFilePath() for futur features.
6 years ago
poire-z 1144efafff ReaderRolling: update footer when TOC is updated (#3950)
Footer item "pages left in chapter" was wrong when changing font
sizes or some other layout option (the footer was drown before
this happen, and not after, until we later change page).
Seems to also fix possible wrong ticks position in that case
(may be only when cache is used/re-used, for some not really
obvious reason)
6 years ago
Robert fbd549bcfd
End of document action (#3943)
* End of document action

* Rev1

* Rev2

* Rev3

* File browser
6 years ago
poire-z 8b2253b3e9
bump base: crengine, freetype, libjpeg-turbo (#3928)
Includes:
- [build] FreeType: bump to 2.9.1
- [build] bump libjpeg-turbo to 1.5.3
- bump crengine:
 - Fix CSS selector specificity computation
 - [fix] crengine/src/lvfntman.cpp: improve letter_spacing limit
 - [fix] crengine/src/lvxml.cpp: add all empty HTML elements
 - html head styles: fix styles not being applied
 - Hyphenation: increase MAX_PATTERN_SIZE from 16 to 35
 - html documents: proper handling of <BR> tags
 - Allows requesting old (broken) XML/DOM building code
- cre.cpp: setStyleSheet(): accept filepath and/or css text,
  and added getIntProperty() and getStringProperty()

credocument/readerrolling: request older XML/DOM building code
for books previously opened, to not lose bookmarks and highlights

(unit tests update because of new handling of consecutive BR via css
pushed links down in the book)
6 years ago
poire-z 82b13a64b0
Fix overlap in scroll mode for cre documents (#3870)
Use a setting 'copt_overlap_lines' (default to 1) for the
number of text lines from previous page to show on next
page (instead of a hardcoded and unscaled 20).
Take footer height into account for overlap calculation
and dim area.
Show overlap only when changing pages (not when panning).

Also fix ReaderFooter:getHeight() which was returning
a higher height than the real one since footer refactoring.
6 years ago
poire-z 7d71d73cc4
Speed up page turning on big cre documents (#3740)
Page turning, menu opening, ... everything actually
6 years ago
poire-z 59496c1d46 Show vertical marker at original position when back from link (#3669)
ReaderLink: make all links be a table (they were a table for PDF,
but a string for CRE) for clearer code. Also have location_stack
store them as tables, with additional properties.
Get original position of link source (and verify it is valid)
so we can show a marker there.

Also:
Hold on "Go back to previous location" to clear location stack.
Resists "Swipe to go back" when previous locations stack has just
become empty, and show a notification.
Fix wrong links with Swipe to follow nearest link on PDF documents.
6 years ago
poire-z 2b89be4f95 Fix cre scroll page update and allow jumping to page (#3333)
This makes Go to, Skim to and TOC page selection work in
scroll mode, and page given to other module more accurate
(previously, we were one action lagging).
7 years ago
poire-z b483c54be8 Fix footer, stats, TOC position with cre in scroll mode (#3304)
This gives the page position to these modules even in scroll mode.
Also, in readerrolling: don't query battery/charging status
when crengine does not need it (used only when it shows its top
progress bar).
7 years ago
poire-z 301892f4b6 [fix] Avoid multiple refreshes when opening credocuments (#3300)
Only noticeable on Kindle (which uses REAGL as partial refresh).
7 years ago
poire-z 5a2c8e4b5e Revert 2 commits that caused crengine scroll mode side effects (#3295)
394be8a (#2855) and 2b3b310 (#3183) introduced side effects (scroll mode
crashing and TOC being reset and rebuild). This reverts parts of them
not yet reverted.
7 years ago
poire-z 26def92983 credocument reader optimisation (avoid multiple TOC builds) (#3292)
Avoid unnecessary work in ReaderView:onSetViewMode() and
ReaderRolling:updatePos() that would result in TOC being reset
and rebuilt (which can take time on books with huge TOC) during
reader setup.
7 years ago
poire-z 53f083f516 Allow for toggling color rendering
New menu item in Screen submenu.
hasColorScreen enabled for SDL device.
7 years ago
poire-z a9c1ed24b8 Show vertical marker at target position when following a link (#3202) 7 years ago
Robert 2b3b310719 Fix: Lost last document position in scroll mode (#3183) 7 years ago
Robert 2a0e424a17 Prevent crash on exit in scroll mode (#3171) 7 years ago
Robert 394be8a651 Remove run twice onPageUpdate() when document is opening (#2855)
* Remove run twice onPageUpdate() when document is opening
7 years ago
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
7 years ago
Frans de Jonge 5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
7 years ago
robert00s a2bfc3858d changes after comments 7 years ago
robert00s 4479d686a0 Refresh status bar after resume 7 years ago
Qingping Hou a943b73303 fix: adjust pan rate for eink and non-eink screens 7 years ago
poire-z 39d1afe37d Update footer when refreshing screen with diagonal swipe
And added diagonal swipe support to readerrolling.
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Qingping Hou 070be5bfb1 fix: migrate readerrolling to touch zones 8 years ago
Qingping Hou abbb72b6d3 readerrolling(fix): do not emit PageUpdate event until document is ready 8 years ago
chrox 0ca82fb072 fix #2084 introduced by copy and paste in #2079 8 years ago
chihyang a948ecb19a Add 'read from right to left' in readerrolling
- Fix problems in readerpaging.lua;
- Add the same feature in readerrolling.lua.
8 years ago
Qingping Hou 572412b1f6 readerrolling(fix): detect end of book properly 8 years ago
Qingping Hou dffc42d234 fix(readerrolling): crash with legacy last_per config in page mode 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
Qingping Hou 8c01835458 fix: only show reader status at the end of the book 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
NiLuJe ce5f66ccbc Prefix battery percentage w/ a + when charging.
Adresses comments on MR.
Add a comment explaining the magic behind CRe's charging icon when using
CRE's full (top) status bar.
9 years ago
chrox 992e769aaf support goto relative page number
We can input relative page number now in the reader goto dialog.
Goto "+4" will page forward 4 pages and goto "-4" will page
backward 4 pages.

This implements #1437.
9 years ago
chrox d08e22ec2e add simple sync service as a plugin
The 'KOSync' plugin will synchronize furthest reading progress
across different koreader devices after users registering their
devices.

The synchronizing service is open-sourced as the project
[koreader/koreader-sync-server](https://github.com/koreader/koreader-sync-server).
9 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox ee3c5525f9 add an option to show an arrow to indicate page overlap 10 years ago
chrox 307bbe8675 fix #1142 by adding 'show page overlap' option for EPUB doc
And 'show page overlap' option is disabled in "page" mode for EPUBs,
and in fit to page/*height zoom mode for PDFs.
10 years ago
chrox ea4a37fe29 fix #1105 10 years ago
chrox 0dd3a1f8a1 add option to turn off e-ink optimization
which currently just sets free the limitation of panning gestures
emitting rate. This should fix #1039 when unchecking the
"E-ink optimization" in the "Screen settings".
10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
chrox 1462d382d9 fix #1013 10 years ago
chrox b422eb90cc refactoring readerrolling
and fix lossing progress when switching screen mode
10 years ago