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

2593 Commits

Author SHA1 Message Date
Robert
a392fbcca0 [feat] VirtualKeyboard cursor navigation (#3290)
Still lacks Japanese due to insufficient knowledge of the language.
2017-10-10 18:04:51 +02:00
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).
2017-10-10 11:57:57 +02:00
Robert
bcb09f3aa1 Flash KeyValuePage item when callback (#3322) 2017-10-08 20:51:24 +02:00
poire-z
9443098e98 Normalize some widgets appearance (those using ButtonTable)
This makes button heights similar in all uses of ButtonTable.
It depended on how the ButtonTable was used in each widget
(previously, first and last row may have different sizes than
the others).

buttontable.lua: more even buttons height whether zero_sep or not
framecontainer.lua: added padding_top/bottom/left/right (similar to
what was done for iconbutton)

The following widgets have been adapted for this, with some
additional fixes:

buttondialog.lua
buttondialogtitle.lua: wider title with adequate padding
confirmbox.lua + multiconfirmbox.lua: dismissable via tap outside
inputdialog.lua + multiinputdialog.lua: more even vertical padding between elements
imageviewer.lua
textviewer.lua
datewidget.lua
timewidget.lua

Additionaly: frontlightwidget.lua: fixed width of progress bar that
was exceeding window width since the Size scaling adjustements
2017-10-08 20:44:11 +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
Frans de Jonge
6e52e559ae [fix, Android] Don't steal frontlight control on start (#3319)
I believe this should be `if isKobo()`, or better yet that the entire
block should be moved to `KoboPowerD:init()` because afaik that is the
only platform where the system doesn't provide trustworthy frontlight
information. But to be absolutely sure that I don't break anything (and I
don't want to spend any time on this atm) I'm temporarily excluding only
Android where this behavior is known to be problematic.

See discussion in https://github.com/koreader/koreader/issues/3118#issuecomment-334995879

References #3118 (using keyword "references" because phrases like "possibly fixes"
result in GH autoclose).
2017-10-08 16:40:24 +02:00
Robert
9ea2b3dbad Option to disable show bottom menu on top menu activation (#3316) 2017-10-08 12:27:53 +02:00
Frans de Jonge
d23d01643e Add LuaData and Dictionary Lookup History (#3161)
* Add dictionary history

Fixes #2033, fixes #2998.

* Add LuaData

* table handling in base settings

* Add LuaData spec
2017-10-07 22:13:46 +02:00
poire-z
8c700eefd9 Avoid some full refreshes on Kindle (#3315)
"partial" refresh causes a full (without black flash) refresh on
Kindle (which uses REAGL mode for partial refresh). This causes a
full redraw of widgets, which is a bit distracting with some of them:
- dictquicklookup: when showing next definition
- infomessage: when displaying a new one (Wikipedia Save as epub)

Also fix bottom menu, that even when closed, would still register
bottom area as dirty: this would cause top menu navigation to
cause a full partial refresh, only noticable on Kindle.
2017-10-07 15:23:39 +02:00
poire-z
e6fcea6e26 Fix crash with keyboard navigation of onHold buttontables (#3307)
* Fix crash with keyboard navigation of onHold buttontables

Would crash when encountering a separator or when the number
of buttons in a row changes.

* Reset previous selected item on new buttontable
2017-10-07 12:11:00 +02:00
poire-z
b7785753c6 [fix] Crash on highlight in some situations (#3306) 2017-10-06 15:58:58 +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
poire-z
301892f4b6 [fix] Avoid multiple refreshes when opening credocuments (#3300)
Only noticeable on Kindle (which uses REAGL as partial refresh).
2017-10-05 17:12:49 +02:00
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.
2017-10-03 21:33:12 +02:00
Frans de Jonge
bf61e6f093 [fix] Android frontlight control 2017-10-03 21:14:38 +02:00
Fabian Müller-Knapp
7d81aa5cf4 [feat] Pocketbook840 enable frontlight (#3294)
* Detect PocketBook840 by GetSoftwareVersion()

* implement Frontlight-support for 840 via inkview
2017-10-03 14:59:41 +02:00
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.
2017-10-03 00:31:14 +02:00
poire-z
308c243238 Inform once about color rendering on supported devices (#3289) 2017-10-02 15:17:17 +02:00
poire-z
1f038055d3 [Fix] Full refresh when showing ImageViewer 2017-10-02 08:28:09 +02:00
poire-z
1a97b4289c [Fix] Show 'Follow Link' even when no dict installed 2017-10-02 08:28:09 +02:00
poire-z
92e0067466 Enable color rendering on Android 2017-10-02 00:10:29 +02:00
poire-z
53f083f516 Allow for toggling color rendering
New menu item in Screen submenu.
hasColorScreen enabled for SDL device.
2017-10-02 00:10:29 +02:00
Robert
7323d04c1b Fix refresh in Time range (#3278) 2017-10-01 14:28:12 +02:00
Frans de Jonge
3dfbd3b2e6 [lang] OPDSCatalog ConfirmBox ok_text/cancel_text (#3281) 2017-10-01 14:27:02 +02:00
poire-z
180f5755f4 Allow for colored rendering (#3276)
* Allow for colored rendering

Available with all engines (CRE, PDF, Images).
Needs to manually add setting: "color_rendering" = true

* Disable color for djvudocument

* Use Screen:isColorEnabled()

* Bump base
2017-10-01 00:16:38 +02:00
Robert
a2ea46bfdc Rename bookmark (#3275) 2017-09-30 18:17:48 +02:00
Frans de Jonge
0d7999e7a5 [fix] Add hold_callback to IconButton (#3271)
Also fix path display update.

Fixes #3270.
2017-09-28 21:26:16 +02:00
Robert
af356a819b [fix] Avoid crash when set home (#3269) 2017-09-28 19:33:01 +02:00
Frans de Jonge
35af912f77 [UX] Smaller borders (#3266)
For years they've been smaller on higher DPI devices and likely very few people realized it was technically a bug. These values round up on lower DPI and smaller screen devices.

References https://github.com/koreader/koreader/issues/3265
2017-09-28 16:25:00 +02:00
Robert
8d765e7d0d Add back button to statistics (#3267)
Closes: #3236 and #3235
Details:

> Also, when looking in days, we see info how many hours we read. It would be great if we could tap a day, it opens info on book(s) we read that day with info pertaining to that day, and if we tap on book, we receive book info for that book.

>  Statistics plugin is really great, I started to look in my reading statistics now much more, but all the time I can go only in one way. And I need to exit at lowest level of info. It would be great if I can use statistics plugin like part of menu, to go up and down within statistics data and exit at my wish, not when I have to.

Also added:

 * new statistics book by week
 * new statistics book by month
 * last year by week now we can see days in selected week
2017-09-28 15:35:25 +02:00
Frans de Jonge
0fc5a378bc [UX] Add home button (#3263)
Tap to go HOME. Hold to set current folder as HOME. When no HOME is set yet tap also asks to set current folder as HOME.

See https://github.com/koreader/koreader/issues/2957#issuecomment-308513062

Closes #3200.
2017-09-27 18:15:11 +02:00
poire-z
0aa0b9b2de ImageWidget: use MuPDF for scaling images (#3260)
* Cache scaled images with scale_for_dpi

* Don't update original self.scale_for_dpi

A same ImageWidget object can be free()'d and re-render()ed,
and we would then lose scale_for_dpi on next renderings
2017-09-26 10:21:58 +02:00
poire-z
9448a52515 [UX] Smaller bottom menu icons (#3257)
And unrelated small optimisation in imagewidget
2017-09-24 15:22:06 +02:00
poire-z
2735c6d369 [fix, UX] Remove rounded corners from fullscreen History (#3256)
Prevent visibility of readers's footer edges.
2017-09-24 14:46:50 +02:00
Robert
88aba421cb Timer Reader with normal time format (#3244) 2017-09-24 13:03:14 +02:00
poire-z
c770d71f14 Fix Menu (TOC, classic file browser...) right padding (#3255) 2017-09-24 01:08:44 +02:00
Huang Xin
a4e1a3ba5e reflect changes in koreader/android-luajit-launcher#62 (#3254) 2017-09-24 05:58:34 +08:00
Frans de Jonge
36478262bf [UX] Smaller top menu icons (#3253) 2017-09-23 22:01:30 +02:00
Frans de Jonge
a6be301695 Added Size module 2017-09-23 20:24:45 +02:00
Frans de Jonge
9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
2017-09-23 20:24:45 +02:00
Frans de Jonge
8babe57106 [fix] ReaderGoto button order 2017-09-23 20:24:45 +02:00
Frans de Jonge
cfb039a91b [fix] Scale ImageWidget by screen size as well as DPI
Fix #3204
2017-09-23 20:24:45 +02:00
Robert
bdf02f14aa Add bookmark browsing mode to menu (#3248) 2017-09-23 18:25:22 +02:00
poire-z
4d18ac1100 Some History fixes and enhancements (#3247)
Made the onHold buttons table similar to the one of File browser.
Added "Purge .sdr" and "Delete" to these buttons.
Moved the purgeSettings and removeFileFromHistoryIfWanted
logic into filemanagerutil functions.
Stay on the same page when manipulating history (previously, we were
always put back on first page).
Really keep deleted files in history (unless setting says otherwise).
Show deleted files in grey or dimmed in classic History and all
CoverBrowser display modes.
2017-09-22 18:24:38 +02:00
poire-z
47139266b2 Dict lookup: allow cancelling with tap
base bumped for ffi/util.getNonBlockingReadSize(luafile)
2017-09-20 23:09:59 +02:00
poire-z
de54ef5ae6 Added Trapper module, for simple interaction with UI
This module provides methods for simple interaction with UI, without
the need for explicit callbacks, for use by linear jobs between
their steps.
Uses coroutines, but their usage is hidden by a simple API.
Factored out of Wikipedia:createEpubWithUI().
2017-09-20 23:09:59 +02:00
poire-z
5828ef8f1c Fix potential crash when clearing hold highlight (#3241)
A delayed clear() could reset hold_pos while a onHold/onHoldPan/
onHoldRelease is in progress, resulting in hold_pos becoming nil and
a crash.
2017-09-20 17:35:30 +02:00
poire-z
941d77f6bc Reduce unhighlight delay when closing dict (#3239) 2017-09-19 22:48:30 +02:00
Robert
5258643a85 Add a date setting (#3234) 2017-09-18 19:04:36 +02:00
mwoz123
ae66a367c2 Android fullscreen switcher (#2938) 2017-09-17 20:29:49 +02:00