2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

56 Commits

Author SHA1 Message Date
smartscripts-nl
16ece06d45
[UX] Add bookmark count as footer item (#6629)
Optionally display number of bookmarks in footer. If no bookmarks defined, don't show this item
2020-09-05 14:54:53 +02:00
poire-z
27e953b127 Bookmarks: avoid possible crash
(Not sure how and with what this check works and if
we still get such kind of items, but avoid a crash
when item2.pos0 exists but item1.pos0 does not.)
2020-08-26 23:43:10 +02:00
yparitcher
2f3fda3fe8
allow some strings to be translated (#6428) 2020-07-25 15:26:26 +02:00
poire-z
9385728769
Bookmarks prev/next via gestures: add location to stack (#6306)
Was correctly done when jumping bookmarks via the Bookmarks
menu and the SkimTo widget, but not from gestures.
Also prevent fillToc() on each page turn when book has no TOC.
2020-06-25 21:19:50 +02:00
Galunid
cd440acdc4
Add chapter title when exporting notes in Evernote (JSON/HTML, remote) (#6146)
closes #4566
closes #6138
2020-06-17 23:51:02 +02:00
poire-z
39345704ec
Statistics: fix number of highlights (#6173)
This number might have been leaking from a previously opened
book, and can be innacurate.
Reset it from the number of highlights stored in settings.
Note that the number of "Notes" shown does not mean much.
2020-05-20 21:40:49 +02:00
poire-z
026140f809 Adds ReaderPageMap, to optionally show source pages numbers
bump crengine: support for EPUB3 nav toc and page maps
Includes:
- Fix lvRect:isRectInside(rc) with 0-width or 0-height rect
- TOC: parse EPUB3 nav toc, fallback to spine when no toc
- Parse and cache various hardcopy page list maps
- epub.css: hide EPUB3 <span epub:type="pagebreak"> content
cre.cpp: add a few PageMap helper functions.

Adds ReaderPageMap which will add a new menu (under TOC and
Bookmarks) that will allow:
- to list source page numbers (like a TOC)
- to show visible page labels in the right margin
- to use these source page numbers in the footer, the TOC,
  the GoTo and SkimTo widgets, and to use the source page
  number in the standard bookmark and highlight initial text.
2020-03-27 18:36:48 +01:00
yparitcher
08359ee1b6
[UX] Next/Previous Bookmark Gestures (#5968)
Fixes #5965
2020-03-16 16:52:09 +01:00
poire-z
85a06ff995 Bookmarks: fix dogear not shown when highlights on same page
Depending on the random ordering of bookmarks and highlights
on a same page, the binary seach could not notice that a
bookmark exists for this page.
Solve this by putting bookmark before highlights on a same
page in the list, and skip them when searching.
2020-02-27 23:59:02 +01:00
yparitcher
f6b23adb2c
skimto: add beginning and end as hold callback (#5820)
* first/last bookmark
2020-02-09 13:00:57 +01:00
poire-z
8110c68e29 [Fix] Update dogear when back from bookmarks list 2020-01-23 19:26:07 +01:00
poire-z
7952fa2c09 [RTL UI] update widgets and apps for UI mirroring
Small tweaks all around to handle UI mirroring:
- swap existing symbols like arrows, or use alternative ones
- rotate some images, like chevrons and dogear icons
- flip some left and right swipe handling
- flip some geometry arithmetic like tap on left or right
  side of page or dict window
- use new ProgressWidget:getPercentageFromPosition() instead
  of geometry arithmetic
- BD.wrap() some concatenated string bits, like in reader
  and menu footers
- flip inverse_reading_order when UI is mirrored

More specific tweaks:
- ReaderGesture: reset some specific gestures when UI direction
  has changed (tap on top/bottom left/right corners, for
  bookmarks and FileManager "Plus menu").
- ReaderRolling: show markers on the correct side of page,
  in single or dual page mode.
- KoptOptions: swap left and right icons in Alignment toggle
- CheckMark: proper rendering in all 4 mirroring/rtl combinations.
- VirtualKeyboard: forbid any mirroring
- Move util.getMenuText into Menu.lua
2019-12-08 15:10:51 +01:00
Frans de Jonge
2104bb6f98
[fix] Distinguish bookmark/page flipping in menu (#5266)
Fixes <https://github.com/koreader/koreader/issues/5265>.
2019-08-27 14:07:14 +02:00
poire-z
9f3c85ed83 cre: toggable enhanced rendering (floats, collapsed margins...)
Adds "Render mode" toggle with 4 modes, to enable some or all
of crengine's new enhanced block rendering features.
Use "legacy" rendering for previously opened books to not mess
with bookmarks, and "web" (all of the new features) for new books.

Also make available the added "HTML5" stylesheet to the Style menu.
2019-07-15 20:14:33 +02:00
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.
2019-03-19 20:18:38 +01:00
Galunid
015fb4d34e Allows adjusting highlight start and end (#4582)
Adds arrow buttons under Delete|Edit.
Tap to move by word, hold to move by char.
2019-02-16 00:42:27 +01:00
onde2rock
53e7a0b6c9 [Non-touch] Add a menu item to toggle a bookmark on the current page (#4262) 2018-10-16 21:05:58 +02:00
poire-z
0d66ea7555
Text input fixes and enhancements (#4084)
InputText, ScrollTextWidget, TextBoxWidget:
- proper line scrolling when moving cursor or inserting/deleting text
  to behave like most text editors do
- fix cursor navigation, optimize refreshes when moving only the cursor,
  don't recreate the textwidget when moving cursor up/down
- optimize refresh areas, stick to "ui" to avoid a "partial" black
  flash every 6 appended or deleted chars

InputText:
- fix issue when toggling Show password multiple times
- new option: InputText.cursor_at_end (default: true)
- if no InputText.height provided, measure the text widget height
  that we would start with, and use a ScrollTextWidget with that
  fixed height, so widget does not overflow container if we extend
  the text and increase the number of lines
- as we are using "ui" refreshes while text editing, allows refreshing
  the InputText with a diagonal swipe on it (actually, refresh the
  whole screen, which allows refreshing the keyboard too if needed)

ScrollTextWidget:
- properly align scrollbar with its TextBoxWidget

TextBoxWidget:
- some cleanup (added new properties to avoid many method calls), added
  proxy methods for upper widgets to get them
- reordered/renamed/refactored the *CharPos* methods for easier reading
  (sorry for the diff that won't help reviewing, but that was needed)

InputDialog:
- new options:
   allow_newline = false, -- allow entering new lines
   cursor_at_end = true, -- starts with cursor at end of text, ready to append
   fullscreen = false, -- adjust to full screen minus keyboard
   condensed = false, -- true will prevent adding air and balance between elements
   add_scroll_buttons = false, -- add scroll Up/Down buttons to first row of buttons
   add_nav_bar = false, -- append a row of page navigation buttons
- find the most adequate text height, when none provided or fullscreen, to
  not overflow screen (and not be stuck with Cancel/Save buttons hidden)
- had to disable the use of a MovableContainer (many issues like becoming
  transparent when a PathChooser comes in front, Hold to paste from
  clipboard, moving the InputDialog under the keyboard and getting stuck...)

GestureRange: fix possible crash (when event processed after widget
destruction ?)

LoginDialog: fix some ui stack increase and possible crash when switching
focus many times.
2018-07-19 08:30:40 +02:00
onde2rock
e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
2018-03-30 12:46:36 +02:00
poire-z
5e47a83e6a
UIManager: avoid painting widgets covered by a full screen widget (#3770)
Navigating the TOC, viewing a full screen image, browsing
reading stats... would call paintTo() on ReaderUI (so, asking
the engine to render the page) or FileManager (so, rendering cover
images) even though their content is hidden.
Widgets registering to UIManager have to explicitely states
they cover the full screen (UIManager can't know, parts of their
dimen may be transparent, e.g. if it is a CenterContainer).
2018-03-17 23:02:32 +01:00
poire-z
e615345ffa TOC, bookmarks: remember current page so we can go back to it 2018-01-31 14:22:28 +01:00
Robert
d163f8281d Menu: configure number of items per page, wrap entries (#3589)
Configure number of items per page (from 6 to 24) - default is 14
Allow filenames to wrap so that we can see the full name
Used by File browser, History, Search Result, Bookmarks, Table of contents (only single line), File chooser, OPDS catalog
2018-01-13 23:38:53 +01:00
Robert
af61153df2 [feat] SkimToWidget chapter markers & next/prev chapter/bookmark (#3389)
https://github.com/koreader/koreader/issues/2819#issuecomment-332261968
+ refactoring code in skimtowidget
+ add chapter markers
+ add next/prev chapter buttons
+ add next/prev bookmark buttons
2017-10-22 11:09:49 +00:00
poire-z
29708884c7 Enable Edit (rename bookmark) when tap on highlight (#3369)
Also fix a few crash possibilities when unhighlighting.
Also fix bug with binary search that could not be able to remove bookmark
when there are multiple bookmarks/highlights on the same page.
2017-10-18 15:19:06 +00:00
Robert
a2ea46bfdc Rename bookmark (#3275) 2017-09-30 18:17:48 +02:00
Robert
bdf02f14aa Add bookmark browsing mode to menu (#3248) 2017-09-23 18:25:22 +02:00
poire-z
991b56664f Added Swipe to follow nearest link/to jump to latest bookmark (#3207) 2017-09-11 22:56:15 +02:00
robert00s
6d5859d11d Read bookmarks without having to view ebook page 2017-07-31 20:36:06 +02:00
Robert
4d0f66a354 Fix: Unhighlight is not clickable in dictionary view and Deleting highlights in bookmarks does not take effect (#3034)
* Fix: Unhighlight is not clickable in dictionary view
* Fix: Deleting highlights in bookmarks does not take effect
2017-07-28 22:39:54 +02:00
Frans de Jonge
e1aa57f27e Font: unify font styling 2017-04-29 03:01:38 -07:00
Frans de Jonge
a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 2017-03-26 11:12:44 +02:00
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
2017-03-26 11:12:44 +02:00
Frans de Jonge
5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
2017-03-26 11:12:44 +02:00
Hzj_jie
f91ad679d9 swithItemTable -> switchItemTable 2017-02-01 06:26:06 -08:00
Qingping Hou
f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 2017-01-02 19:52:09 -08:00
poire-z
2c01f3add9 Fix: dog ears disappearance when switching fonts (#2394)
or switching orientation, or some other page layout setting.
Reverted commit a049edd, which should be done better (see #2395).
2016-12-04 12:03:11 -08:00
Qingping Hou
c22a3747d8 fix all the tests 2016-04-19 00:01:28 -07:00
Qingping Hou
a049eddcbc bookmark(fix): bookmark comparison for crengine 2016-04-18 23:51:06 -07:00
Qingping Hou
eb37d9b8b6 kobo: fix screen probe for touch 2016-04-02 23:06:09 -07:00
Qingping Hou
e422842256 minor: a lot of luacheck fixes 2016-02-15 23:10:07 -08:00
Qingping Hou
186673587e chore: fix some of the luacheck errors 2015-04-26 20:57:45 -04:00
NiLuJe
50dbf6b581 Switch a few widgets to ui refresh modes
More closely matches native behavior on REAGL devices.
Closing those widgets should still trigger a partial refresh though,
because we usually get back to the reader, and text, so we want REAGL
;).
2015-04-26 20:07:17 +02:00
chrox
90a5e09bdc disable highlight in dict window if it's highlighted already
This should fix #1418.
2015-03-12 18:51:01 +08:00
chrox
ca6b3d7e33 fix #1373 by checking the pos0 and pos1 of selected text 2015-02-02 00:09:07 +08:00
chrox
10db20f289 don't add duplicated bookmark and can delete bookmark
This should fix #1397.
2015-02-01 21:37:25 +08:00
chrox
d9fa97df5a fix #1336 by ignoring uncompatiable saved highlights 2014-12-04 09:13:56 +08:00
chrox
fe885be563 refactoring readerbookmark to show both bookmarks and highlights
in the bookmark menu
and use binary search of the sorted bookmarks table whenever is
possible.
2014-11-27 22:01:57 +08:00
Frans de Jonge
d701d9b198 First util.template encapsulated strings 2014-11-19 12:23:37 +01:00
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.
2014-11-02 21:19:04 +01:00
Qingping Hou
b0682b0470 chore: code clean up 2014-10-26 03:05:17 -04:00