Commit Graph

58 Commits (dd9cd0e87ebfed3478b2750638d2688a511b3649)

Author SHA1 Message Date
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
chrox 896ad0e8f8 fix #976 10 years ago
chrox b09bb87d4e refactoring readertoc and readerfooter
so that they don't repeat themselves.
10 years ago
chrox beaf768250 recalculate footer sizes when document page count is updated 10 years ago
WS64 3fcd10bc01 Update TOC after changing screen mode 10 years ago
WS64 225966ef62 Use of new functions to jump to next/previous chapter that also works in 2-page mode 10 years ago