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

210 Commits

Author SHA1 Message Date
Frans de Jonge
a5089f0272
[i18n] Add missing bookmark count translation (#6692)
Cf. <https://www.mobileread.com/forums/showpost.php?p=4037153&postcount=8>.
2020-09-21 20:52:40 +02:00
NiLuJe
592e4f42df
Hilariously simpler fix for #6616 (#6650)
* Hilariously simpler fix for #6616

Reverts #6648 for a much, much simpler solution, that will actually
cover every possible situation automagically.
2020-09-13 19:00:03 +02:00
NiLuJe
e0546d0fc8
Prevent automatic footer refreshes from drawing the footer on top of stuff that isn't ReaderUI (#6648)
* Prevent refreshing the footer automatically where it doesn't make sense to.

Issue exposed by #6540
Fix #6616
2020-09-12 22:57:53 +02:00
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
bafc52afd1 util: adds util.secondsToHour(), util.secondsToDate() 2020-08-29 20:07:26 +02:00
NiLuJe
af3d98aeb7
Always update the table of footer text generators (#6563)
It's only needed by all_at_once, but we were skipping it if nothing or
only a single mode was enabled.
It lead to desync w/ the settings, or a crash.

Fix #6561
2020-08-25 16:47:32 +02:00
NiLuJe
0e27963ae7
Minor flash tweaks after #6528 (#6540)
* Boundaries are now detected both when paging forward and backward.

Fixes potential false-negatives in the chapter boundary heuristic code, as mentioned in https://github.com/koreader/koreader/pull/6528#issuecomment-678610188 ;).

* Tweaked ReaderFooter to not repaint ReaderUI when it's unnecessary. (toggling/cycling it on a page with significant image content would flash the full screen).

* Only flash the first time a page w/ significant image content is shown. (Menus, among other things, could otherwise re-trip the flash).
2020-08-23 03:46:05 +02:00
NiLuJe
37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
2020-07-27 03:39:06 +02:00
Martín Fernández
ca21d1401a SDL: use platform as model for desktop computers, report battery if available 2020-07-22 14:41:11 +02:00
yparitcher
7849d58a76
Fix footer update on UpdatePos event (#6392)
Regression from 70f89c4d (#6292).
2020-07-19 06:56:39 +02:00
yparitcher
70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
2020-07-12 14:47:49 -04:00
yparitcher
f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
2020-07-01 16:17:41 -04:00
NiLuJe
1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
2020-06-13 01:56:36 +02:00
NiLuJe
1384b5e97d
A few footer tweaks (allow setting height through UI) (#6257)
* * Refresh the footer instantly when changing the prefix, separator, or
  formatting.
* Allow setting the container height (formerly
  DMINIBAR_CONTAINER_HEIGHT)
* Allow setting the container bottom padding (formerly 1 flex pixel)
* Refactor ReaderFooter:applyFooterMode
  Handle toggling the genFooterText function even in all at once mode
  Make sure the layout is properly reset when changing visibility state,
  to avoid inconsistencies with complex layouts.
2020-06-11 18:49:51 +02:00
Martín Fernández
2f831bebc7
android: replace default footer margins by values that work with rounded corner devices (#6260)
That's it: replace "static 10px" margins by a value that takes device DPI into account and works with rounded corner devices.

Fixes #6157
2020-06-11 16:44:24 +02:00
poire-z
5536ce996a CRE: use same marks in top and bottom progress bars
Feed to crengine the same ticks (build from the TOC
entries) that we use in the bottom status bar.
(crengine otherwise builds a tick for each DocFragment,
which most often is really different than what's seen
in the bottom bar.)
2020-06-05 20:13:59 +02:00
poire-z
a753f332de
Footer: skip tap lock when needed (#6225)
7d139263 was preventing some features to work,
so skip it in some cases:
When toggling between top & bottom status bar (a tap
is simulated to show the bottom bar).
When in flipping mode (jumps to page at tap position).
When toggling via menu (shown only when zero tap zone).
2020-06-04 15:56:37 +02:00
Martín Fernández
879f8a7624
[Desktop] Fix missing glyphs by packaging freefonts again (#6218)
Also disable battery completely from defaults/option in desktop linux as it always return 0%
2020-06-01 08:07:42 +02:00
poire-z
fc6c786f84
Footer: fix items possibly missing (#6212)
Iterating a k/v table as an array would have us stopped
on the first disabled MODE (frontlight, battery... on
some devices).
Rework that initial setup, and make it correctly handle
added or removed MODEs when using the ordered items
saved in the user settings.
2020-05-30 22:10:32 +02:00
poire-z
e5206922c6 [UX] Normalize SpinWidget and DoubleSpinWidget
- Use same names for options;
- Have them both movable
- Add option to keep widget shown on Apply (and use that
  when appropriate: when the value may have an immediate
  visual effect, so one can tweak it without having to
  go thru menus to re-open it again).
2020-05-09 23:29:49 +02:00
Robert
7d139263d8
Option to prevent tap on status bar (#6083)
See: #5969
2020-04-26 10:35:48 +02:00
Martín Fdez
8e831eb756 desktop: disable battery on touch menu and reader footer
isDesktop and isEmulator are now different entities
2020-04-13 19:24:28 +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
182dc60e00
[i18n] allow translation of time (12/24-hours formats) (#5898)
Discussion around https://github.com/koreader/koreader/issues/5359#issuecomment-590593945
2020-02-26 08:34:42 +01:00
Robert
a7def7e833
Footer: bold font option (#5849)
cf. https://www.mobileread.com/forums/showpost.php?p=3946581&postcount=5 and https://www.mobileread.com/forums/showpost.php?p=3938492&postcount=5
2020-02-12 17:51:08 +01:00
Robert
dfd2baa3ad Footer: extend min and max values for font size (#5796) 2020-01-28 14:21:44 +01:00
poire-z
23d848acf4 Reader: strict ordering of tap & hold gestures (#5789)
The lack of proper overrides could make their
order/precedence/priority non-deterministic.
2020-01-24 20:05:21 +01:00
Robert
2e601640af [UX] Footer: update progress bar min width to 5% (#5788) 2020-01-23 21:41:06 +01:00
Robert
85da41afd9 [UX] Footer: add options to show title and current chapter (#5775) 2020-01-23 21:28:37 +01:00
Robert
4a6b8587d7 [UX] Footer: add option to set progress bar min width (#5757)
Allow progress bar to be seen when "Show all at once" enabled
and many items selected (text part will then be truncated).
2020-01-12 20:19:10 +01:00
Robert
8a0ce98149 [UX] Footer: add option to set font size (#5736) 2020-01-05 00:09:27 +01:00
Robert
dd0c6c0bb8 [UX] Footer - add option chapter markers width (#5708) 2019-12-30 16:20:31 +01:00
poire-z
1e1ceedd4d [i18n] Add translator notes for footer letter prefixes 2019-12-10 23:57:32 +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
NiLuJe
b21b4c8776
Update nerdfonts symbol codepoints for the updated version with no PUA (#5595)
* Update nerdfonts symbol codepoints for the updated version with no PUA conflicts

Should no longer stomp on Arabic & CJK PUA stuff.
2019-11-15 19:06:35 +01:00
NiLuJe
61a8b63757
Minor fixes after #5537 (#5538)
* Restore '+' prefix when charging in the footer w/ letters prefixes

Regression since #5537

* Don't use a full battery icon in the menu entry

Make it clear that one isn't in-sync with the current gauge
2019-10-27 19:10:25 +01:00
NiLuJe
8d281647ae
Unify battery meters look'n feel (#5537)
* Unify battery meters look'n feel

Switch to proper (vertical) battery icons (one per 10% steps).

Fix #5535

* Bump fonts (https://github.com/koreader/koreader-fonts/pull/7)

Because we need the new symbols from nerdfonts ;).
2019-10-27 05:22:17 +01:00
NiLuJe
f2f2aa6e4d
Minor state handling tweaks when the footer is disabled/invisible (#5494)
* Don't break `doc_pages` updates when it's completely disabled. (c.f., the commit's comment, doing it on every page turn seems a bit overkill, but I get that it's probably done that way because it was easier ;)).
* Detect the empty footerTextGenerator properly in `_updateFooterText` (it's `""`, not `nil`).
* Abort `_updateFooterText` early when the footer is invisible (and has been for a while/ever, i.e., when not requesting a repaint, like a mode switch would).
* Never send `SetBottomPageMargin` events twice.
* Minor tweaks to touchmenu & configdialog to avoid useless repaints (don't redraw the reader/fm unless we absolutely need to).
* Make sure we show the progress bar alone instead of nothing when disabling the last enabled mode in the menu.
2019-10-15 21:57:51 +02:00
Robert
40ba01fd72 Fix footer with no_mode/disabled progress bar (#5491) 2019-10-13 14:47:06 +02:00
Robert
5209493ba8 [UX] Option to show progress bar at the bottom of the screen (#5442) 2019-10-10 17:02:28 +02:00
Robert
27de8d9bdf Fix: Footer overflow screen after resize emulator window (#5439) 2019-09-30 20:05:29 +02:00
Robert
0778ec09fc Fix: incorrect chapter markers (#5425) 2019-09-25 19:40:00 +02:00
Robert
e2c771dd2d Two-line footer (#5405)
Close: #1933

New option that moves progress bar to separate line in footer.
2019-09-20 09:33:29 +02:00
Robert
8c1610b4e9 Fix: Incorrect width of separator line (#5403)
Fix: #5399
2019-09-19 11:51:55 +02:00
Robert
d08516bd89 Fix: footer offset when orientation changes (#5396)
Fix: #5395
2019-09-18 11:13:51 +02:00
Robert
a7c358b080 [UX] Sort footer elements (#5389)
Close: #5329 

- new option for footer - `Sort items`
- new widget `SortWidget`
2019-09-17 14:50:03 +02:00
Robert
deaa5d98e6 Disable show chapter markers when progress bar is hidden in footer (#5345) 2019-09-11 17:56:26 +02:00
Robert
2d95a09e93 [UX] Option to show horizontal line separator in footer (#5309)
The separator is hidden by default.
2019-09-05 13:58:34 +02:00
Robert
d7d99d8b8b New memory icon for footer (#5300)
See: https://github.com/koreader/koreader/pull/5203#issuecomment-525849264
Old memory icon: ⌨
New: ≡
2019-09-01 15:55:41 +02:00
Frans de Jonge
6ed58346a1
[i18n] Add translator notes (#5250)
Thanks to <https://github.com/koreader/koreader/pull/5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <https://github.com/koreader/koreader/issues/3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <https://github.com/koreader/koreader/pull/2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.
2019-08-24 09:25:38 +02:00
Robert
395503d6ba [fix] Prevent double run genFooterText (#5233) 2019-08-21 15:00:09 +02:00
Robert
f56e9bcf98 Fix after #5203 (#5218)
https://github.com/koreader/koreader/pull/5203#issuecomment-522156268
https://github.com/koreader/koreader/pull/5203#pullrequestreview-276228925
2019-08-17 19:45:18 +02:00
Robert
5da3312869 More footer options, default to use icons as prefixes (#5203)
- show icons or letters as prefix of items
- various footer separators
- progress percentage format with decimal digits
- time in 12/24 format
- two duration formats (1:30, 1h30')
- move some options into Settings submenu
2019-08-16 23:22:58 +02:00
Robert
0a2a1fffe8 [UI] Status bar alignment (#5195)
Close #5044
Option to align status bar without progress bar.
2019-08-11 19:58:39 +02:00
Robert
69ee8c48cc Fix: Status bar hides text with minimal bottom margin (#5135)
With very narrow bottom margin text is sometimes hidden by status bar.
2019-07-22 20:42:36 +02:00
NiLuJe
888d3591b2
Give more control over CRe margins (#4945)
Without having to resort to weird custom defaults.

* Split the current margins setting in three:
  * Horizontal margins (because you generally want those two to be balanced).
  * Top margin & Bottom margin (because you may want to tweak those separately to deal with quirky status bar/final line shenanigans).

* Also, add a "Reclaim bar height from bottom margin" toggle to the status bar menu, to optionally make sure the status bar won't eat into the bottom margin.

* Includes a free fix to diacritics popup refresh handling in the keyboard ;).
2019-05-01 02:09:01 +02:00
NiLuJe
33946aa732
Some FL regression fixes after #4901 (#4921)
* Make hasNaturalLight* caps safe to call without a device check. (fix #4919)
Make it clear that it's expecting the NTX implementation, though.
* Don't turn the FL on on resume if it was off on suspend
* Make sure turnOn/turnOff actually updates hw_intensity in the process where it matters, instead of just in a short lived fork ;). (fix #4923)
2019-04-15 20:06:24 +02:00
poire-z
7396abebf2 [chore] reformat all gestures "overrides" to be diff friendly 2019-03-30 23:47:07 +01:00
NiLuJe
b72a2000b1
A few minor fixes after #4847 (#4850)
* Add a toggle to disable the C blitter in the Dev menu (depends on https://github.com/koreader/koreader-base/pull/882) (never shown if the JIT is disabled, grayed out if the C blitter is not installed)
* Fix a few sizeUtf8Text call sites that were doing a nil check in order to account for the new return type.
* Tweak statusbar handling to avoid spurious sizeUtf8Text warnings when it's hidden, and unify its behavior between being hidden via toggle, and hidden on book open (at least when all-at-once is not enabled).
* c.f., https://github.com/koreader/koreader-base/pull/882 (Android, PB, RGB32 & Legacy Kindle regression fixes).
2019-03-29 20:12:09 +01:00
Frans de Jonge
614cbb509d
[fix] ReaderFooter: Don't hide progressbar if it's the only ticked option (#4648)
Fixes #3914.

Cf. #3056.
2019-03-02 15:06:26 +01:00
NiLuJe
b274080846
Some more repaint/refresh tweaks (#4578)
* ReaderView & ReaderPaging panning should *probably* keep using "partial" ;). (Fix #4575)
* Try to avoid unnecessary footer repaints (mini status bar)
2019-02-11 03:28:46 +01:00
NiLuJe
812e595608
Enable HW dithering in a few key places (#4541)
* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
  * FileManager and co. (where appropriate, i.e., when covers are shown)
  * Book Status
  * Reader, where appropriate:
    * CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
    * Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
  * ScreenSaver
  * ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
  (The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
  either by switching the widget to nil when only a refresh was needed, and not a repaint,
  or by passing the appropritate widget to setDirty.
  (Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
  There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
  We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.

PS: (Almost 💯 commits! :D)
2019-02-07 01:14:37 +01:00
poire-z
f8199dd493
Fix a few edge cases crashes and issues (#4334)
- ReaderConfig does not need to call again self:initGesListener() on
  screen rotation/resize, as it uses the TouchZone infrastructure
  that deals itself with rotation. So, it was adding new gestures
  that were overriding tap on footer and preventing it from working.
- ReaderFooter: fix refresh area (which was too small when toggling
  from hidden to visible)
- ReaderToc: fix crash when showing TOC in scroll mode after rotation
- Menu: fix crash when no onReturn defined (could happen when tap on
  bottom left corner when showing an empty TOC)
2018-11-14 20:58:56 +01:00
Martín Fernández
1e69fae7bc [feat] Add support for BQ/Fnac devices (#4294)
Adds support for devices found in https://blog.bq.com/es/bq-ereaders-developers-program/. Tested on BQ Cervantes 4 (last BQ device from 2017).

It adds a new touch input event handler (discussed in #4275) which should work on other single touch devices (ie: Kobo Touch, Mini, Glo, Aura HD) but wasn't tested.

Includes base bump with: [feat] Add BQ/Fnac device support (https://github.com/koreader/koreader-base/pull/745)
2018-10-31 23:48:36 +01:00
poire-z
233f375af4 Cleanup onSetStatusLine()
Follow up to fa0117bb (#4268), to make things a bit clearer:
Only ReaderRolling get the 'SetStatusLine' event, and tells
crengine about the change, and then send the 'UpdatePos' event.
ReaderFooter now just gets a :setVisible() method.

Now, all the code that calls a self.ui.document:set* method, that
most probably triggers a full re-rendering by crengine, do signal
'UpdatePos' immediately after. This event signals that all page
number, pages count, positions... are no more valid and must be
queried or computed again.
This could also be used if we ever want to cache Page Links or
Screen Boxes: this event will have us dropped these caches.
2018-10-23 13:12:40 +02:00
poire-z
fa0117bb2a Fix default not being used for View mode and Progress bar
Default setting set by holding on the bottom config buttons
for "View mode" (scroll/page) and "Progress bar" (full/mini)
were not used.

Also, when switching Progress bar from 'full' to 'mini',
show the mini bar again.
2018-10-14 21:32:31 +02:00
Robert
a8e4ce8b01 Footer: launch SkimTo (instead of GoTo) on long-press (#4097) 2018-07-24 21:47:07 +02:00
poire-z
c3a938aad6
bump crengine: alternative TOC, no page break on borders (#4011)
Includes:
- Avoid page break between a node and its borders
- Allow building an alternative TOC from document headings

On CRE documents, allows toggling between original TOC and an
alternative TOC with long-press on the "Table of content" menu
item.

Also update the Wikipedia stylesheet to further avoid
page-breaks between images and their caption, so a full
bordered wikipedia thumbnail is always full on a single page.
2018-06-14 00:46:52 +02:00
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.
2018-04-14 00:26:57 +02:00
Frans de Jonge
96242648c8
[UX] apps/reader/modules/readerfooter: also redraw progressbar on height change (#3780) 2018-03-20 21:41:53 +01:00
mwoz123
a01271b8a6 [Android] Wifi status in footer (#3396)
Implemented through the Android API so it's reasonably cheap.
2017-10-28 17:51:34 +02:00
poire-z
2fc8076139 Better vertical centering of text in its box
Decide baseline vertical position according to font metrics, instead
of the hardcoded 0.7 (in textwidget, which made the text a little
bit up in its box), and 0.75 (in toggleswitch, which made the text a
little bit down in its box). This usually gives a value around 0.72
or 0.73 with our ui fonts, which looks about right.
ReaderFooter: add bottom padding, now that our text goes a few pixels lower
2017-10-08 20:44:11 +02:00
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).
2017-10-05 21:49:59 +02:00
Robert
2c3936ddb4 Refactoring readerfooter statistics - TB and TC (#3223) 2017-09-16 13:36:54 +02:00
Robert
40ec848098 Remove % from frontlight level on devices other than Kobo (#3162) 2017-09-02 18:33:40 +02:00
Robert
0e2d20353a Statistics plugin v2 (SQLite) (#2893) 2017-08-29 17:34:49 +02:00
Robert
1bfad22af0 Fix: Footer hides text (#3056)
This patch should resolve issue #2257 (Footer hides text)
Sometimes, depending on an epub style, some text is hidden by the progress bar (the mini one at the bottom).
2017-08-08 19:06:11 +02:00
Robert
21c63a297e Gesture to show only config menu (#3051)
* Gesture to show only config menu

* Show config menu from bottom
2017-08-05 21:49:00 +02:00
poire-z
64f699ba36 Store book metadata and nb of pages in new settings
They may already be available (with other statistics stuff) under
the 'stats' key, but not if Statistics plugin is disabled. As this
plugin may be migrated to SQLite, readerui and readerfooter will now
set two new properties: doc_props (containing all and only the metadata
returned by document:getDocumentProps()) and doc_pages (updated
by readerfooter on any display or font change).

PDF document: returns additional PDF properties: Keywords
and Subject (as Description).
2017-07-14 16:46:38 +02:00
Hzj_jie
d83de47204 Add onFrontlightStateChanged event (#2966)
So we do not need the hacky solution in KoboLight plugin anymore. PageFooter can receive and process the event itself.
2017-06-19 19:00:36 -07:00
Hzj_jie
53eb4dee50 AutoFrontlight plugin (#2941)
* Add AutoFrontlight plugin

* Add configuration to control autofrontlight feature
2017-06-14 19:32:16 +02:00
Frans de Jonge
89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
2017-04-15 14:45:56 +02:00
robert00s
7872bd3bc1 Fix: Frontlight level in Status bar in Kobos without light 2017-04-13 19:53:46 +02:00
Qingping Hou
15fd7fc0ff bring back support for disabling progressbar in footer (#2753)
* footer(optimize): remove dead code

* footer(fix): disable auto refresh time option when current time is not checked

* fix: support disable progress bar again
2017-04-11 11:44:58 +02:00
Frans de Jonge
92b9139294 ReaderFooter (lang): "Show toc markers" to "Show chapter markers"
I think it sounds more natural as chapter than as table of content, which is an implementation detail (i.e., the chapter markers are shown based on what's in the TOC).

Also removed redundant "this" from "Remaining pages in this chapter"
2017-04-08 01:39:25 -07:00
robert00s
ba74921c4b Fix showing footer on Kindle with Special Offers screensaver 2017-04-05 10:26:09 +02:00
Frans de Jonge
b076ca1c29 ReaderFooter: fix quick browsing by tapping footer in flipping mode
Fixes #2649.
2017-04-03 10:10:23 -07:00
Frans de Jonge
8f31a81601 MenuSorter: some documentation
MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
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
robert00s
a2bfc3858d changes after comments 2017-03-24 12:00:15 -07:00
Qingping Hou
fc12ee6537 decouple reader footer from dictquicklookup widget & translation fix (#2664)
* chore: fix strings for translations

* dictionary(chore): decouple reader footer from dictquicklookup widget
2017-03-24 00:20:37 -07:00
poire-z
39d1afe37d Update footer when refreshing screen with diagonal swipe
And added diagonal swipe support to readerrolling.
2017-03-20 11:19:14 -07:00
poire-z
4316284260 Footer: added "memory usage" item
Helps following KOReader memory usage (and memory leaks).
2017-03-11 18:20:13 -08:00
Qingping Hou
9b7aba3fba fix: override readerhighlight hold in readerfooter
Also fix touch zone dependency graph generation code.

ReaderHighlight has now been migrated to use touch zone

Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
2017-01-30 05:53:44 -08:00
Qingping Hou
ead5dfd9b4 readerview(feat): add registerViewModule method 2016-12-25 12:13:53 -08:00
Qingping Hou
d2743b6f15 fix: migrate readermenu to use touch zone 2016-12-18 20:28:13 -08:00
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
2016-12-10 16:06:51 -08:00
Qingping Hou
8799b4b6b1 doc: geometry module 2016-12-10 16:06:51 -08:00