Commit Graph

89 Commits (039947886fbc1de89f0236837015b1d817db99f5)

Author SHA1 Message Date
poire-z 2697a30166 [fix] Optimize cre highlights onTap and drawing (#3508)
drawXPointerSavedHighlight() and onTapXPointerSavedHighlight were
looping thru all credocuments highlights, which was expensive.
Now, we first check with cheaper getPageFromXPointer() the highlights
are on the current page before doing more expensive stuff.

Closes #3503.
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
Frans de Jonge 6815959f06 ReaderView: add long-press to set default
Fixes #2915
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Qingping Hou ead5dfd9b4 readerview(feat): add registerViewModule method 8 years ago
Qingping Hou 0c49b915de refactor: add touch zone subsystem to inputcontainer
Touch zone decouples screen size from gesture event registration.

The win here is each individual widget does not need to update
gesture range on screen rotate/resize anymore.

Another advantage is we now have a centralized ordered array to handle
all registered touch event listeners, makes it much easier to resolve
gesture range conflicts between multiple widgets.

This patch also includes the following changes:

* migrate readerpaging to use readerui's touch zone
* migrate readerfooter to use readerui's touch zone
* move inverse read direction setting to touch menu's setting tab
* moved kobolight widget from readerview into readerui
* various dead code cleanups and comments
8 years ago
Bastien Dejean 41764e23e8 Make page gap configurable 8 years ago
ycrichard 17e9a8e45b add kobo frontlight gesture (#2284)
* add kobo frontlight gesture
8 years ago
chrox 166aa52a24 move painting and drawing debug log to verbose 8 years ago
Qingping Hou 1c5543358c readerfooter(fix): avoid setting mini footer to invisible when full progress bar is on
Our previous assumption is user will only choose between full or min
bar. The does not hold anymore as many more info has been added to the
mini bar and sometimes user might want to have both of them on. This
patch makes the reader behavior consistent when both bars are set to be
on for a document.
8 years ago
Qingping Hou 726259f5a1 reader(fix): fix crash when DAUTO_SAVE_PAGING_COUNT is set to 0
* setup autoSaveSettings callback on ReaderReady event
* delay calling autoSaveSettings with UIManager:nextTick
8 years ago
Qingping Hou a10a4f65a5 minor: use predefined color instead of gray method 8 years ago
chrox 551857ce6e fix some luacheck warnings 8 years ago
Qingping Hou 0f3eeb24c9 progressbar(fix): persist progressbar visibility 8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
Qingping Hou 2d5222ef33 readerview: add get/set methods for view context 8 years ago
Qingping Hou 1ede9d03f1 fix: avoid initializing readerfooter multiple times
This will create multiple autoRefreshTime function and crash the reader on exit
8 years ago
Qingping Hou b63ddb8736 fix: kill in fly hinting event on document close 8 years ago
Qingping Hou 59c17ef420 minor: more luacheck fixes 8 years ago
chrox 35abf4bfaf move minibar configurations to reader menu
and fix #1446 by adding progress percentage in minibar.
9 years ago
Hans-Werner Hilse 05503791b4 issue a full refresh when changing rotation 10 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox 548e830fdc fix crash when highlighting text in EPUB documents
Since the new Screen:getSize modthod returns a regular table
instead of a Geom which is set to the dimen field of readerview,
there is no copy method in the dimen field. And we don't need to
copy dimen any more since the result won't be modified. Even the
screen page area somehow needs to be modified, the caller of this
function should make a copy of that variable by itself.
10 years ago
Hans-Werner Hilse 22697adf20 switch from scaleByDPI() to scaleBySize() 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
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
Hans-Werner Hilse 5982e24d57 unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
10 years ago
chrox 07ae0cba81 fix #1011
The #1011 bug is caused by the `contains` check of link box with
visible area. When the link is at the very right (left?) of
the page, enlarged link box often exceeds the page bound rendering
the mentioned `contains` check failed. This patch uses an `intersectWith`
test to check if the link is in current page.
10 years ago
chrox d30709edb0 add djvu render mode options in readermenu 10 years ago
chrox e714caed8d refactoring restoreScreenMode from readerview to filemanager
This should fix #983.
10 years ago
chrox d7fa72e46c negative x panning if writing direction is set right to left
so that in right to left writing/drawing system the right part
of the page is drawn first
10 years ago
WS64 f259e3d92d remember saved default value for screen mode 10 years ago
chrox 27b15b7020 restrict highlight in current page area
This should fix #588.

Highlight in multiple pages is too complicated and requires large
code refactoring and will not be considered for now.
10 years ago
chrox 8f982faa7b fix page to screen rect transform for highlighting 10 years ago
chrox e1527611c5 show a box indicator when tapping on a link
only for PDF/DJVU docs for now since there is no easy way
to get link box from crengine
10 years ago
chrox f9302cd17d fix recalculate from close document pageno 10 years ago
Qingping Hou 4b357c1466 move reader code into frontend/apps/reader
it makes more sense to completely separate the UI framework and
application code

also move frontend/ui/configurable.lua to frontend/configurable.lua
10 years ago