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

3885 Commits

Author SHA1 Message Date
poire-z
95d18fe8d9
Statistics: revamp settings, add calendar settings (#5867)
Also adds options to remove statistics for books
with low reading duration (to clean up stats for
books just quickly browsed and not yet read).
Also adds TextWidget:getFontSizeToFitHeight()
even if we ended up not using it.
2020-02-16 01:03:12 +01:00
poire-z
f0c6fc92db Style tweaks: reorganize in submenus, add a few
Try to limit the nb of items per menu page to 5 or 6 by
splitting related ones into sub-menus, so we get more
room below to see how they affect the content.
Adds "No indentation on first/following paragraphs" and
"Paragraphs margins and paddings", and Links underlining.
2020-02-15 12:31:55 +01:00
poire-z
30f9673c7d Font menu: show only 5 items per page
To get more room below to see how the text looks
with the selected font.
2020-02-15 12:31:55 +01:00
poire-z
d22924c550 Footnote popups: CSS: remove some vertical margin
To fit more lines in the popup, and to look more like
how crengine epub.css would render the content.
Also normalize some horizontal margins.
2020-02-15 12:31:55 +01:00
Frans de Jonge
159fe03f47
Make dictionary margin depend on font size (#5865)
The default left margin on blockquote and dd is `40px`, but unfortunately that doesn't scale. rem is calculated using a hardcoded16px, so em or % is the best compromise in this case.

PS If we assume 1em = 16px then 40px is actually 2.5em, not 1em. This reduction in indentation is mainly intended for the benefit of smaller E Ink devices.

Closes <https://github.com/koreader/koreader/issues/5859>.
2020-02-15 12:23:22 +01:00
yparitcher
3e00e686b6
file count: Fixes #5843 (#5858) 2020-02-13 09:43:10 +01:00
Frans de Jonge
5692f7df75 sort 2020-02-13 08:21:24 +01:00
Matias Nitsche
0575ed4c14 PRSTUX: interact with USB charger 2020-02-13 08:21:24 +01:00
poire-z
3ca46577bf
Statistics: new Calendar view (#5854)
Also fix RTL UI mirroring in OverlapGroup when
overlap_offset are used.
2020-02-12 23:05:18 +01:00
Frans de Jonge
f8aacc6a99
Spelling: Wi-Fi, turn on/off, on/off (#5856)
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2020-02-12 21:16:55 +01:00
Allan Nordhøy
7486329215
Spelling: for example (#5855) 2020-02-12 20:38:41 +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
Frans de Jonge
0cdbd7bd38
[chore] Add translator comment for Alexandre Dumas (#5851)
The "author:" prefix looks like some kind of special search syntax, but it doesn't seem to be.
2020-02-12 17:39:08 +01:00
NiLuJe
de15ab3a87
Unbreak OTA on crappy shells (#5850)
* Unbreak OTA on crappy shells

  Very, very old ash versions abort on set -o failures (as mandated by
POSIX, granted). This makes it impossible to reliably catch failures in
a single step.

So do it from the Lua side instead.

Should fix #5844

* Launch the zsync wrapper through bash on Cervantes
2020-02-12 00:07:05 +01:00
Frans de Jonge
1d3842ffa0
[fix] More accurate count in FileChooser (#5846)
Fixes <https://github.com/koreader/koreader/issues/5843>.
2020-02-11 15:13:20 +01:00
poire-z
8ffb9aff64 Wikipedia EPUBs: keep original float left/right in web mode
Previous cleanup resurrected multiple class names, so
we know now the original alignment of a float.
Use them in 'web' mode, as it allows floats to be nearer
the section they are refering to, and it may limit
floats truncation in page splitting.
But keep floats aligned on a single side in 'book' mode,
as it might allow easier reading.
2020-02-10 19:17:20 +01:00
NiLuJe
833fed79ff
Honor dithering on diagonal swipe refreshes (#5836)
c.f., https://github.com/koreader/koreader-base/pull/1039#issuecomment-583494496
2020-02-09 22:50:06 +01:00
yparitcher
f6b23adb2c
skimto: add beginning and end as hold callback (#5820)
* first/last bookmark
2020-02-09 13:00:57 +01:00
NiLuJe
73659b6bd6
Print zsync2's output on screen (#5824)
* Also remove the temporary files when doing a full retry
* Bump base
  Pickup the required zsync2/FBInk updates
  (https://github.com/koreader/koreader-base/pull/1038)
* Actually does what it says on the tin for Abort
  i.e., cleanup temporary files
2020-02-09 05:08:46 +01:00
Thomas Spurden
6f849c5285
A couple of minor remarkable port fixes (#5834)
* remarkable: remove unnecessary screen invalidate on resume

This is handled in uimanager if needsScreenRefreshAfterResume is enabled
(which is the default).

* remarkable: pass a path argument to reader.lua

Otherwise if lastfile is not set in the settings (e.g. install and then
exit without opening a file) koreader will just refuse to start.

* remarkable: pass koreader.sh args (if any) through to reader.lua
2020-02-08 18:07:09 +01:00
Frans de Jonge
6dfe65279c
[chore] FileChooser: "traditional" for loop for ~15-25% better performance (#5827)
Apparently there's less overhead this way.

See https://github.com/koreader/koreader/pull/5819 for context.
2020-02-08 11:45:26 +01:00
Frans de Jonge
1177baaf01 [CI] Ignore unscaled size check on mt_width/height (#5829)
See https://github.com/koreader/koreader/pull/5828#issuecomment-583677718

* fix luacheck too
2020-02-08 10:08:13 +01:00
Martín Fernández
67627ce2d9
Remarkable port (#5828)
Touchscreen is mirrored in X & Y and has a different resolution from the eink panel.

Uses systemd for time/date/suspend/poweroff/reboot
Two systemd units for platform integration. button-listen is a very
simple launcher.
to-do: add support for wifi by implementing  a wpa supplicant dbus client.

Authored-by: Thomas Spurden <tcrs@users.noreply.github.com>
2020-02-08 01:58:10 +01:00
Martín Fernández
3856f04445 android: switch to connectivity manager
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2020-02-07 16:54:01 +01:00
Sergey Avseyev
2420625be1
Add searchable version of flibusta OPDS catalog (#5826) 2020-02-07 14:50:30 +01:00
bateast
fa94e6bbf6
Add “searchable” capabilities to OPDS catalogs (#5823)
OPDS catalogs may have search query capabilities. It is very usefull to find a
book in huge catalog, even when they are organized as directories. This commit
provides the possibility to add a %s mark in an OPS catalog URL, that would
trigger a search box when browsing the OPDS in koreader.
2020-02-07 13:27:04 +01:00
Frans de Jonge
e0ce993c61
[fix] Don't waste time on dir/file attributes in subdirs (#5819)
An awful lot of effort was wasted getting attributes just for getting a count of the number of files/directories in subdirectories. Getting the count is pretty fast. Getting all the attributes is not, and in this context we don't even use the attributes.

See <https://www.mobileread.com/forums/showthread.php?t=327085> and <https://gitter.im/koreader/koreader?at=5e3ac3b9e8a838355918ba13> for discussion.
2020-02-05 19:32:07 +01:00
yparitcher
a3173ec275
end of document: add go to beginning (#5814)
* ReaderGoto: goto beginning and end

* end of the document: add go to beginning
2020-02-05 08:19:35 +01:00
NiLuJe
80c1e5290c
File search & BookInfo: Don't traverse hidden folders if we're not showing them (#5816)
* File search: Don't traverse hidden folders if we're not showing them

Re https://www.mobileread.com/forums/showpost.php?p=3949194&postcount=21

* Ignore macOS resource forks, too.

* Apply the same logic to the BookInfo directory walker

* And never ever show resource forks in the FM, either.
2020-02-05 03:14:21 +01:00
NiLuJe
3c2353e439
Stop using the "calibre catalog" wording (#5813)
It's extremely confusing, as it has nothing to do with calibre catalogs,
which are actual things the user can generate manually.

What it's using instead is actually a metadata cache in a flatfile db
that's always present, as long as "Send To Device" was used to upload
the content to the device.
2020-02-04 22:03:21 +01:00
Frans de Jonge
44c69dadb6
[chore] Replace ... with … (ellipsis) (#5815)
Follow-up to <https://github.com/koreader/koreader/pull/5804>.
2020-02-04 19:22:33 +01:00
NiLuJe
9a20fb5836
Switch to zsync2 (#5810)
* Switch to zsync2

Requires https://github.com/koreader/koreader-base/pull/1036

* Simplify FBInk syntax

The weird-ass workarounds for -s's subopts handling are
no longer needed w/ FBInk >= 1.21.0

* Update base

* Re-enable HW dithering on Kindle
  (https://github.com/koreader/koreader-base/pull/1034)
* Update SQLite to 3.31.1
  (https://github.com/koreader/koreader-base/pull/1035)
* reMarkable port
  (https://github.com/koreader/koreader-base/pull/1023)
* zsync2
  (https://github.com/koreader/koreader-base/pull/1036)

* zsync2 means we can finally have nice things

(OpenStack backed storage)

* We also no longer need that insane workaround on ARM

* And comment out @chrox's mirror, which appears to be down.

* Warn that a malformed URL will horribly blow up in fun and interesting
ways
2020-02-04 03:14:23 +01:00
NiLuJe
5499d85cbc
Allow running shell scripts from the FileManager/Favorites (#5804)
* Allow running Shell/Python scripts from the FM

* Show an InfoMessage before/after running the script

Since we're blocking the UI ;).

* Allow running scripts from the favorites menu, too.
2020-02-03 20:08:18 +01:00
Frans de Jonge
d64e143297
[i18n] GetText: ignore fuzzy strings (#5807)
Strings are prefilled by msgmerge with closely matching ones to reduce the amount of labor required by the translator. Often the string requires only minor adjustment, making the process faster, and when the string isn't a good match it's no big deal. However, these so-called fuzzy strings shouldn't be treated as if they were actually translated.

Fixes the effect seen in <https://github.com/koreader/koreader/issues/5806>.
2020-02-03 12:11:07 +01:00
NiLuJe
283187efb7
Update fonts & add Noto Sans Devanagari UI (#5803)
* Update fonts

https://github.com/koreader/koreader-fonts/pull/11

* Add Noto Sans Devanagari UI to the UI fallback font list (fix #2895).
2020-01-31 17:25:13 +01:00
poire-z
f6a64de44a View HTML: adds another extended debug view
Split the extended debug view (rendering method + unicode
codepoints) into 2 distinct views, as it's more practical.
2020-01-31 15:33:13 +01:00
poire-z
1b55baf437 cre: default to enable crengine call cache
Also reset cache when calling :enableInternalHistory(), as it solves
screen orientation change unit tests failures (although there is no
issue in regular use of the app).
2020-01-31 15:33:13 +01:00
poire-z
6d2cada96e Wikipedia Save as EPUB: better gallery rendering
Switch Wikipedia galleries from floats to inline-block.
Also remove some crengine bugs workaround code as these
bugs have been fixed for a long time.
2020-01-31 15:33:13 +01:00
poire-z
1ccc658401 Style tweaks: adds "Enforce steady line heights"
And re-order them a bit to group the line-height related
ones together.
2020-01-31 15:33:13 +01:00
Robert
dfd2baa3ad Footer: extend min and max values for font size (#5796) 2020-01-28 14:21:44 +01:00
Mustafa Ali Mutlu
5724971466 add turkish f keyboard layout (#5795) 2020-01-28 00:05:16 +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
yparitcher
236609c431 fix arabic keyboard to conform to #5639 (#5793)
Fixes #5792
2020-01-24 09:16:52 +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
NiLuJe
f44b031702
Make Inverted Portrait a first-class citizen (#5783)
* Don't store stale screen/rotation modes in book's settings!

Gyro events *may* entirely bypass the local copy...
In any case, using a local copy was essentially asking for trouble...

Actually fix #5772

(because the issue was indeed that a Gyro swap from Portrait to Inverted
Portrait wasn't stored properly).

* Allow showing ScreenSavers in Inverted Portrait.

That works just fine, and won't lead to the confusing situation where a
lefty might pick up the device as a righty because the ScreenSaver
happens to be shown that way, only to have it rotate back to its lefty
orientation on wakeup...
2020-01-23 20:08:51 +01:00
poire-z
2d02ade498 Footnote popups: drop justification if RTL content
MuPDF does not handle "text-align: justify" correctly on
RTL text: the last line is left-aligned, but it should be
right-aligned.
Not using justify makes it correctly right align the whole
text.
2020-01-23 19:26:07 +01:00
poire-z
8110c68e29 [Fix] Update dogear when back from bookmarks list 2020-01-23 19:26:07 +01:00
poire-z
c449d0ad1e [UI] Render metadata text with book language
Gives the book language to Text*Widget (and XText) when
drawing title, authors and other metadata text.
Might be needed to properly display a Japanese book title
when the UI language is Chinese.
2020-01-23 19:26:07 +01:00
Robert
56dc0412b3 Show or hide hidden folders in folder favorites chooser (#5785) 2020-01-23 11:00:29 +01:00
WaseemAlkurdi
c8b3942bf4 [UX] Keyboard for Arabic and languages with Arabic script (#5569) 2020-01-18 22:47:34 +01:00
poire-z
605f6026bb
TextWidget: adds getFittedText() (#5776)
bump base for xtext:getText().
2020-01-18 00:04:32 +01:00
poire-z
6f04ff546c cre: add toggable crengine call cache
Optimise usage of some of CreDocument methods by caching
their results, either globally, or per page/pos for those
whose result may depend on current page number or y-pos.
This helps a lot on cre books with a lot of highlights.
2020-01-17 17:42:07 +01:00
poire-z
e3b4116f4d opds: add one public server (Gallica) 2020-01-17 17:42:07 +01:00
poire-z
7eee758149
bump crengine: support inline-block, better text selection (#5763)
Includes:
- lvtinydom.cpp: fix Use-after-free
- lvtextfm: fix/cleanup lastnonspace code bits
- lvtextfm: fix vertical-align: top & bottom
- renderBlockElementEnhanced: minor fixes related to floats
- renderBlockElementEnhanced: compute baseline of block
- Add support for display: inline-block/inline-table
- Better selection highlighting by using getSegmentRects()
- getHtml(): add flag to get text soft-hyphenated

cre.cpp: toggable text selection highlighting method,
default to the new one using segments.

Update various cre flags to use the new features (and
to conform with some flags re-ordering):
- support display: inline-block in flat, book and web
  render modes.
- get HTML with soft-hyphens for footnote popups, so MuPDF
  can use them when rendering the footnote.
2020-01-14 01:14:15 +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
73a0f2f9d1 Remove DSCROLL_MODE and DGLOBALGAMMA (#5754) 2020-01-07 20:16:59 +01:00
Frans de Jonge
d9b37a1794
[i18n] Add translators comment about Markdown (#5752)
As pointed out by @comradekingu on <https://hosted.weblate.org/translate/koreader/koreader/en/?q=has:comment#comments> it looks like some translators have mistakenly interpreted this as a reduction in price.
2020-01-07 12:26:49 +01:00
poire-z
acfc8c0440
CRE multipage text selection: mirror corners when inverse_reading_order (#5751) 2020-01-06 21:09:00 +01:00
poire-z
e172926af5 LoginDialog: fix crash on focus switch (#5749) 2020-01-06 11:59:17 +01:00
Martín Fernández
ffabb26aae close menu before sharing text 2020-01-05 16:21:45 +01:00
Martín Fernández
5ef329c19c android: share text (#5745) 2020-01-05 12:56:01 +01:00
Robert
8a0ce98149 [UX] Footer: add option to set font size (#5736) 2020-01-05 00:09:27 +01:00
Martín Fernández
51ed411ee4 android: OTA fallback using the browser
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2020-01-04 21:08:17 +01:00
Martín Fernández
419b42cf2c
android: call EPD test from within KOReader (#5737)
* android: call EPD test from within KOReader

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2020-01-04 20:53:49 +01:00
poire-z
2e947e6ffe PicDocuments: fix crash on hold + pan (#5742) 2020-01-04 10:35:17 +01:00
poire-z
0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
2020-01-04 01:34:46 +01:00
poire-z
a31abf79de TextBoxWidget: fix some truncation ellipsis issues
Ellipsis was sometimes not displayed when text is right aligned,
because width was not updated with ellipsis size.
bump base/xtext: fix truncation ellipsis position in bidi text
so it stays nearer to previous logical order char, instead of
sometimes being thrown away to start or end of line.
2020-01-04 01:34:46 +01:00
poire-z
b4ff207ece [fix, i18n] Auto-save book metadata: fix interval string (#5729)
See https://github.com/koreader/koreader/pull/5687#issuecomment-570226614 and followups.
2020-01-02 21:31:29 +01:00
Mustafa Ali Mutlu
12adb96206 [feat] Option to change page gap in continuous mode (#5705)
Fixes #5656.
2020-01-02 21:30:03 +01:00
poire-z
5ea1a7c817 Style tweaks: In-page footnotes: add some classic classnames 2020-01-02 16:25:10 +01:00
poire-z
378dfdc1df ConfirmBox: prevent lower widgets from responding to tap 2020-01-02 16:25:10 +01:00
Martín Fernández
25e80358dc android: import files from Storage Access Framework 2020-01-02 01:28:20 +01:00
Frans de Jonge
3436e47367
[fix] Update hardcoded gettext workaround for Romanian (#5718)
Fixes #5661.
2020-01-01 20:41:42 +01:00
Frans de Jonge
ecc9715371
[chore] Ellipsis instead of dots (#5720)
Thanks to Weblate, see https://github.com/koreader/koreader/issues/3754
2020-01-01 15:20:16 +01:00
Frans de Jonge
e3fa9bd4b8
[fix] Various minor string issues (#5719)
Fixes <https://github.com/koreader/koreader/issues/5712>.
2020-01-01 12:41:37 +01:00
poire-z
908151a3b0 [feat] Adds Document> Auto-save book metadata sub-menu (#5687)
Replaces DAUTO_SAVE_PAGING_COUNT in defaults.lua with
a new option available in menu, that allows setting
an interval in minutes instead of a page count.
2020-01-01 12:27:51 +01:00
Frans de Jonge
0ea889aecb
[fix] Restore most Japanese keyboard layers (#5709)
The Japanese keyboard still needs to be cleaned out a bit more at some point, but the important thing is that this commit fixes #5632 by restoring the kanji layer with the voiced-unvoiced conversion symbol.
2019-12-30 16:52:58 +01:00
Robert
dd0c6c0bb8 [UX] Footer - add option chapter markers width (#5708) 2019-12-30 16:20:31 +01:00
Robert
c3a0bd4def Remove DFULL_SCREEN (#5695) 2019-12-27 23:03:31 +01:00
poire-z
6596e5ddc7 [RTL UI] GetText/Bidi: wrap untranslated strings in LTR 2019-12-17 23:46:35 +01:00
poire-z
a628714f51 [RTL UI] Bidi wrapping tweaks
- Alias everything to Bidi.nowrap() when in LTR UI, as using
  LTR isolates seems uneeded when already LTR.
- Better wrapping of RTL filename by using auto direction and
  LTR-isolating only the suffix so it's always on a side.
- menu.lua: handle bidi_wrap_func outside getMenuText(), which
  may be used in other contexts.
- Add BD.filepath() and BD.dirpath()
2019-12-17 23:46:35 +01:00
poire-z
f488eb2bb3 util.getFriendlySize(): add option to right align
Left align by default, but allow right alignment by
padding left with spaces.
2019-12-17 23:46:35 +01:00
poire-z
d89317e820 bump crengine, fribidi, xtext
- bump crengine: (Upstream) DocX: fix paragraphs with single hyperlink
- bump fribidi to 1.0.8 (for nested isolates fix)
- xtext.makeLine(): return no_allowed_break_met=true when that
  happens, so we know the line breaks inside a word.

TextBoxWidget: add forgotten property (when use_xtext=true) when no
line break opportunity was found: has_split_inside_word=true.
(Only used by CoverBrowser Mosaic mode to make nicer text covers
by reducing font size when that happens.)
2019-12-16 23:55:31 +01:00
Mihai Vasiliu
739a3009ff [i18n] Fix Romanian plural forms (#5692)
Hardcode the plural forms logic for Romanian.

This fixes #5661 and enables Romanian (Moldova) language in the menu.
2019-12-16 20:21:07 +01:00
poire-z
a838a6eb1d TextBoxWidget: fix crash when empty last line and alignment center/right (#5691) 2019-12-15 20:05:50 +01:00
poire-z
ea67b9be77 TextBoxWidget: fix crash on hold after end of text (#5689) 2019-12-14 15:33:43 +01:00
Frans de Jonge
7d231acad0
[UX] Simple symbol keyboard layer paging (#5659)
Use 1/2 and 2/2 instead of Shift on the symbol layer.
2019-12-13 16:20:16 +01:00
Martín Fernández
f9a820d682 android: unbreak KO on scoped storage devices 2019-12-12 21:17:03 +01:00
Robert
794598c1e9 fix: Crash FM after delete file from end of document action (#5684) 2019-12-12 18:49:11 +01:00
Robert
e26ad2b287 [UX] Adds DoubleSpinWidget (#5679)
Replaces HyphenationLimits widget by making it more generic.
2019-12-11 23:12:55 +01:00
poire-z
04d9a557aa Use fsync() for more robust setting files saving
Bump base for util.fsyncOpenedFile() and util.fsyncDirectory().

Use these to force flush to storage device when
saving luasetting, docsetting, and history.lua.
Also dont rotate them to .old until they are at least
60 seconds old.
Also make auto_save_paging_count count right.

Also bump crengine: open (as text) small or empty files
2019-12-10 23:57:32 +01:00
poire-z
1e1ceedd4d [i18n] Add translator notes for footer letter prefixes 2019-12-10 23:57:32 +01:00
poire-z
55f3575a10
UI font rendering: use available bold fonts for bold (#5675)
A few fixes and enhancement related to bold text:
- When using bold=true with a regular font, use its bold
  variant if one exists (can be prevented by manually
  adding a setting: "use_bold_font_for_bold" = false).
- When using a bold font without bold=true, promote bold
  to true, so fallback fonts are drawn bold too.
- Whether using a bold font, or using bold=true, ensure
  fallback fonts are drawn bold, with their available bold
  variant if one exists, or with synthetized bold.
- When using a bold variant of a fallback font, keep using
  the regular variant as another fallback (as bold fonts
  may contain less glyphs than their regular counterpart).
- Allow providing bold=Font.FORCE_SYNTHETIZED_BOLD to
  get synth bold even when a bold font exists (might be
  interesting to get text in bold the same width as the
  same text non-bold).
- Use the font realname in the key when caching glyphs,
  instead of our aliases (cfont, infont...) to avoid
  duplication and wasting memory.
2019-12-08 20:31:27 +01:00
yparitcher
b578d8aa8b Fix continuous scroll & footer overlap (#5657)
closes  #5654

like #5620 but for continuous mode.
2019-12-08 19:27:14 +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
poire-z
36ce82d8c2 [RTL UI] update low-level widgets to handle mirroring
These updated low-level widgets will handle 90%
of the needed UI mirroring.
2019-12-08 15:10:51 +01:00
poire-z
d6d49a64a7 [RTL UI] use auto or LTR text direction in some specific cases
Allow TextBoxWidget new text direction/lang parameters to be
set on upper widgets, and propagate them all the way to it
(ScrollTextWidget, InputText, InputDialog, TextViewer).

Use specific non-default ones in some specific cases:
- Force LTR text direction when showing HTML and CSS, and
  configuration files (in some plugins).
- Use Wikipedia server language and text direction when
  showing an article.
- Use auto with Dictionary results, as we don't know the
  dictionary language, and they may contain mixed content.
- Force LTR when showing some paths (still needs more of them)

TextEditor plugin: add 2 new options "Auto paragraph direction"
and "Force paragraph direction LTR".

Footnotes popup: grab HTML direction, and forward it
to MuPDF for proper display.
2019-12-08 15:10:51 +01:00
poire-z
866c9571df [RTL UI] adds bidi.lua, bootstrap UI mirroring with RTL languages
Set default language (for Harfbuzz to pick up localized glyphs
in a font), default text direction, and UI element mirroring
depending on the UI language.
2019-12-08 15:10:51 +01:00
poire-z
3c280f6e5f KeyValuePage: proper padding between key and value
Use some HorizontalSpan for padding between key and value,
instead of prepending a space to the value text (which
won't work as expected if value text is RTL, as it would
be put on the right side of screen).
2019-12-08 15:10:51 +01:00
poire-z
ef08f50336 DictQuickLookup: properly truncate title text 2019-12-08 15:10:51 +01:00
Martín Fernández
a5069f1c26 android: make system fonts toggable (#5670)
Also add droid font back to android and remove the workaround
2019-12-08 14:54:14 +01:00
Martín Fernández
72e5574ca7 android: allow overrides on 3rd party dictionary list 2019-12-07 17:22:00 +01:00
poire-z
e9032a2b2a TextBoxWidget: slightly better cursor positionning in RTL text 2019-12-05 12:18:52 +01:00
poire-z
588c35967f TextBoxWidget: minor optimisations
It's best to do all free'ing via :free(), and not :onCloseWidget(),
as :free() is more logically called in cascade when upper widgets
are closed.
2019-12-05 12:18:52 +01:00
Mihai Vasiliu
e8f91ab399 [UX] ru keyboard ё popup and translation (#5662)
Changes in this commit:
- Fix arrays to large (10 elements instead of 8) copied from the old keyboard system.  Issue introduced in #5610 
- Add ё popup.
- Change shift key as per #5659 (for both ro and ru keyboards)
- Translate Russian space and symbol keys.
- Rename Sym key to 123
2019-12-03 15:09:06 +01:00
poire-z
3d191490d0
Touch zones: fix loss of overrides when re-registering a zone (#5658)
Happens with "Inverse reading order", which re-registers
the Reader tap forward/backward zones and would prevent
tap menu and bookmark from working.
Before, when removing them, we would lose all the override=
set on them by other touch zones (tap menu, bookmarks...),
and so they were no more ensured after re-adding the zone.
So, make sure we don't lose that info.
2019-11-30 17:38:28 +01:00
Mihai Vasiliu
2541440bb8 [UX] Add Romanian keyboard layout (#5660)
This adds a new separate Romanian keyboard layout, with popup support.

- Functional buttons are translated.
- Pages 5&6 contain 3 groups of characters (I tried my best to group them logically):
  - On the left: traditional Romanian cyrillic pre-1850s
  - On the middle latinised forms from 1850s onwards
  - On the right modern diacritics from 1900s to today
- Pages 7&8 add only large double quotes and section/paragraph mark.
- Popups are only avalable for most common diacritics. Swipe up for circumflex, swipe down for breve.

I can really call this the most complete though-the-ages Romanian keyboard. :)
2019-11-30 17:35:39 +01:00
Mihai Vasiliu
849bd951ed [UX] Add Moldavian diacritics to ru_keyboard (#5652)
Added Ӂӂ on the Russian layout popup for Moldavian.
2019-11-30 16:37:17 +01:00
poire-z
a1247160a1 TextWidget: minor optimisations
Also fix possible crash with NumberPickerWidget.
2019-11-29 23:45:12 +01:00
poire-z
5541d5f5d3 bump crengine: word spacing and hyphenation tweaks
Includes:
- New option to tune word spacing: space width scale percent
- Text: look for hyphenation in more words if needed
- CSS: fix "hyphens:none" should override inherited "hyphens:auto"
- getHtml(): grab dir= and lang= attributes from upper nodes

Replace our Word Gap/Space condensing toggle/setting with
a new Word Spacing toggle/setting, made of 2 values:
- 1st number scales the normal width of spaces in all font
  (100% uses the font space width untouched)
- 2nd number applies after the 1st has been applied, and
  tells how much these spaces can additionally be condensed
  to make more text fit on a line.
2019-11-29 23:45:12 +01:00
Robert
e4dd1826fa Translate file size unit (#5651)
Close #5649
2019-11-28 23:22:07 +01:00
Robert
494b38e9c8 [fix] Dictionary font size: avoid crash in reader mode (#5650) 2019-11-28 10:54:06 +01:00
Robert
b0738960df Dictionary: add menu item to set font size (#5647) 2019-11-27 23:59:08 +01:00
poire-z
397211644d Keyboard: properly handle keyboard layout height change
The japanese keyboard being taller than the others, when
switching to/from it from/to another layout:
- re-init InputDialog for proper sizing and positionning
- refresh the whole screen, to remove any trace of
  a previous taller keyboard

Also add calls to :free() here and there to free keyboard
keys' TextWidgets' XText C objects without waiting for GC.
2019-11-26 21:14:06 +01:00
poire-z
13fa6d962c Korean keyboard: unwrap InputText on layout change
The korean keyboard wraps InputText and overrides some
of its methods to process input in some specific way.
When switching to another keyboard layout, the original
methods need to be restored.
2019-11-26 21:14:06 +01:00
Martín Fernández
5a28cbd630 android: add /sdcard/fonts 2019-11-26 15:04:41 +01:00
Robert
a96114d14a Remove DRCOUNTMAX (#5644) 2019-11-26 15:03:05 +01:00
Robert
2161a76ea8 fix util.secondsToHClock when hmsFormat is true (#5640) 2019-11-26 13:28:11 +01:00
Robert
d93206a841 Remove DCREREADER_PROGRESS_BAR (#5641) 2019-11-26 13:18:11 +01:00
NiLuJe
4778d3db3b
[RFC] Switch remaining keyboard icons to glyphs (#5639)
* Switch the last few remaining icons to true glyphs
(Del/Backspace & Enter).
Also, allow a glyph to be rendered in (fake) bold, and use it for Enter.
* Update fonts
Pickup the tweaked nerdfonts for the backspace symbol
2019-11-25 23:34:31 +01:00
poire-z
f410315f83 Screensaver: avoid crash when no lastfile 2019-11-24 17:21:18 +01:00
NiLuJe
d8e0b1759b
Other minor frontend.util cleanups (#5629)
* Resync fixUtf8 w/ upstream
* Fix lastIndexOf desc
* Drop unichar usage, it's a crappier unicodeCodepointToUtf8 ;).
2019-11-24 00:27:27 +01:00
NiLuJe
e0f14a336e
Rewrite unicodeCodepointToUtf8 w/ bitopt (#5625)
* Rewrite unicodeCodepointToUtf8 w/ bitopt

Avoids costly divs & modulos
2019-11-22 19:50:58 +01:00
yparitcher
6d3e7fcef6 [fix] PDF footer margins (#5620)
closes #5612 

the change in `ReaderView:recalculate()` causes the viewable page size to be calculated by not including the footer, causing the text not to get cut off.

since the page area was not drawing under the footer `ReaderView:drawPageSurround()` had to be fixed to draw the margin under the footer so when tapping the footer off the area should be dran the background color.
2019-11-21 10:05:40 +01:00
Robert
03fda96041 [fix] Empty directory path and crash on TextWidget (#5606) 2019-11-19 21:06:03 +01:00
Frans de Jonge
7775233688
[fix] Prevent xtext crash by not freeing TextWidget prematurely (#5616)
Fixes <https://github.com/koreader/koreader/issues/5614>.
2019-11-19 17:21:42 +01:00
Robert
e655616876 Cloud storage UX improvements (#5613)
* Overwrite confirmbox order

* Restore confirmbox option to read the downloaded book
2019-11-19 16:52:11 +01:00
Frans de Jonge
15fe0fef07
[chore] Extract Cyrillic/Russian keyboard (#5610)
Follow-up to #5583.

* Add separate Cyrillic/Russian keyboard

* And remove that from English

* Update French keyboard (is easy)

* Remove yahzhert, that was just a double of QWERTY

* Update Spanish keyboard

* Reduce Japanese to 4 layers and add globe

* Reduce Korean to 4 layers

* Reduce Greek to 8 layers
2019-11-18 23:33:22 +01:00
Frans de Jonge
67b57834da
[lang] Minor touchups (#5611) 2019-11-18 20:51:08 +01:00
Robert
04741d8cfd [feat] Synchronize local folder with dropbox (#5591)
Option to synchronize files in local koreader folder with folder on Dropbox. All files that aren't on the local disk will be downloaded. Files with different sizes will also be downloaded and overwritten.
The download process can be paused or stopped at any time (similar to downloading images in Wikipedia).

Synchronize and settings are available after long press in dropbox account in Cloud storage.
Limitations: Only one folder (without subfolders) can be synchronize with one folder on local storage.
2019-11-18 18:39:45 +01:00
yparitcher
5e8d1227ef [feat, UX] Pick keyboard layout from keyboard (#5583)
* Tap goes to next activated keyboard.
* Hold opens a selection popup.
2019-11-18 17:16:06 +01:00
Frans de Jonge
50878eab9e
[fix] Tailor plurals match (#5603)
Fixes #5601.
2019-11-18 12:41:22 +01:00
poire-z
89c0bd0886 ConfigDialog: allow larger toggle title text
Avoid a few truncated text, as some fit when allowed
to bite a bit on the (large) left padding.
2019-11-16 23:39:01 +01:00
poire-z
558bd1ebeb cre fonts list: ignore nerdfonts/symbol.ttf
It's rejected anyway by crengine, this just avoids
an error from being logged.
2019-11-16 23:39:01 +01:00
poire-z
dc8696bd34 TextBoxWidget: add new properties, use them in Menu
- height_adjust: if true, reduce height to a multiple of
  line_height (for nicer centering)
- height_overflow_show_ellipsis: if height overflow, append
  ellipsis to last shown line
(Implemented in both use_xtext and legacy code path.)

Use them in Menu.lua to clean up/shorten the code used for multiline
menu items by delegating the work to TextBoxWidget, or using
TextWidget when we end up needing only a single line.
2019-11-16 18:41:14 +01:00
poire-z
e699a1ee22 TextBoxWidget: use xtext for text shaping
Alternative code to size, split lines and draw text with
the help of the xtext Lua C module.
Enabled by default (can be disabled via an added menu
item in "Developer options").

New properties can be specified by calling widgets, only
used when xtext is used:
- lang: use specified language instead of the UI language
- para_direction_rtl: true/false to override the default
  direction for the UI language
- auto_para_direction: detect direction of each paragraph
  in text
- alignment_strict: prevent the inversion of the specified
  alignment= that is done when a paragraph direction is
  set or detected as RTL.

Also: fix possible memory leak (present even when not using xtext)
by calling :free() in onCloseWidget() like it's done in ImageWidget.
2019-11-16 18:41:14 +01:00
poire-z
22e3e34c45 TextWidget: use xtext for text shaping
Alternative code to size and draw text with the help
of the xtext Lua C module.
Enabled by default (can be disabled via an added menu
item in "Developer options").

New properties can be specified by calling widgets, only
used when xtext is used:
- lang: use specified language instead of the UI language
- para_direction_rtl: true/false to override the default
  direction for the UI language
- auto_para_direction: detect direction of each paragraph
  in text
2019-11-16 18:41:14 +01:00
poire-z
c2e2c00db6 Font rendering: add some helpers for use by xtext
bump base for libkoreader-xtext.so:
- ffi/pic.lua: fix memory leak with some unsupported PNG files
- FreeType ffi: add methods for use with Harfbuzz shaping
- thirdparty: adds libunibreak
- Adds libkoreader-xtext.so: enhanced text shaping

Add a getFallbackFont(N) to each Lua font object to instantiate
(if not yet done) and return the Nth fallback font for the font.

Fallback fonts list: add NotoSansArabicUI-Regular.ttf

Add RenderText:getGlyphByIndex() to get a glyph bitmap by glyph
index, which is what we'll get from Harfbuzz shaping.
(RenderText:getGlyph() works with unicode charcode).
2019-11-16 18:41:14 +01:00
poire-z
272d8857a2 TextBoxWidget: fix two minor bugs 2019-11-16 18:41:14 +01:00
poire-z
0fb780ea21 PicDocument: log reason of opening failure 2019-11-16 18:41:14 +01:00
Robert
679b592c80 [UX] Add Mark as read to end of document action (#5596) 2019-11-16 14:51:21 +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
Robert
e166a77eba [UX] Gesture to open Favorites (#5592)
Close: #5576 
+ default multigesture east - west - east -> open `Favorites`,
+ ability to add new gesture to open `Favorites`
2019-11-14 15:00:05 +01:00
Frans de Jonge
2855fdfdac
[feat] Support callback function in VirtualKeyPopup (#5588)
Required for <https://github.com/koreader/koreader/pull/5583>.
2019-11-11 23:10:27 +01:00
Frans de Jonge
425c808c18
[UX] Switch ButtonTable to COLOR_GRAY (#5585)
Same as the menu.

See <https://github.com/koreader/koreader/pull/5584>.
2019-11-11 10:05:28 +01:00
yparitcher
816b197ab9 [UX] Thicker loading bar (#5581)
The current thickness for the loading bar when opening a document is to thin to really see on my KT4,
2019-11-10 21:27:49 +01:00
yparitcher
83b7d8de2b [UX] Default setting option always enabled (#5580)
as per https://github.com/koreader/koreader/pull/5522#issuecomment-548006595 do not grey out the current default
2019-11-08 21:01:38 +01:00
Robert
98555908c8 [fix] Enable rewind button in sort widget (#5579)
See: #5578
Close: #5578
2019-11-08 10:26:41 +01:00
Robert
2ae91ac6f6 [fix] Prevent crash on local calibre OPDS server (#5572)
Close: #5476 
- Prevent segmentation fault when we enter incorrect address of calibre opds server (eg http://192.168.1.1:8080/ instead of proper http://192.168.1.1:8080/opds
- prevent unnecessary infos in Gutenberg OPDS
2019-11-07 20:37:02 +01:00
poire-z
0885e9947d Keyboard: avoid additional key stroke on hold release (#5573) 2019-11-06 21:26:17 +01:00
Frans de Jonge
f0b2d58342
Revert "Fix frozen confirmbox when keyboard shown (#5452)" (#5574)
This reverts commit 513fd807b0.
2019-11-06 21:02:27 +01:00
Martín Fernández
f1f75c5cb0 android: touchscreen toggle option (#5564) 2019-11-06 00:52:44 +01:00
Robert
371e3336a5 [feat] Favorites: organize book into collections (#5527)
View, add, remove, sort, open book to/from collections.
For now, only one collection named Favorites.
2019-11-06 00:17:28 +01:00
poire-z
04ce1836d8 Avoid double flash when switching or reloading document (#5568) 2019-11-04 16:44:13 +01:00
poire-z
4462380048
Wikipedia lookup results: fix page turning when image loading (#5560)
Tapping to turn page while some image is loading was
interrupting the image loading, but not turning the page,
since a82d7832 where using trap_widget=false is to be
used to not resend the event (while =nil does resend it).
2019-11-02 02:30:12 +01:00
poire-z
6baa2af5fb
cre: use 'best' (Harfbuzz) as the default kerning method (#5553)
It might be slower, but is needed to properly display
books in arabic, indic...
Also bump crengine: use FreeType "light" hinting algorithm,
which hints on the y-axis only (and so avoid messing with
advances and kerning on the x-axis).
2019-11-01 23:07:41 +01:00
poire-z
eb8795e4e0
ButtonTable: taller buttons for easier tap (#5554) 2019-11-01 01:52:05 +01:00
Frans de Jonge
34090c2f22
[fix, Android] Crash on startup when no homedir is set (#5548)
By calling the function instead of returning it. Fixes #5547.
2019-10-29 17:56:21 +01:00
NiLuJe
21c5d58685
Allow access to the topmenu clock format even if !Device:setDateTime() (#5543) 2019-10-28 22:42:07 +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
Robert
7b6a3f3cb2 [fix] Handle max_width in time widget (#5540)
Set max_width like in #5503
2019-10-27 18:30:39 +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
yparitcher
40d6a7665b [fix] Typo in #5522 (#5530) 2019-10-25 18:33:26 +02:00
yparitcher
aa165cefe9 [UX] Set global settings independent of local setting (#5522) 2019-10-25 17:25:26 +02:00
yparitcher
6c68df42ec [feat] Open unsupported documents as text (#5497) 2019-10-23 23:15:30 +02:00
Robert
c7ecd08d9d Menu: new algorithm for multi-lines items (#5496)
(used by bookmarks list and classic file browser)
When text is too long or line too tall:
first: we try to decrease the number of lines (eg from 3 to 2 and from 2 to 1 line)
second: when 1 line is too tall, we try to decrease font size (-1)
And at the end we try to add or remove chars to better fit text.
2019-10-22 12:48:47 +02:00
Frans de Jonge
d1cd5e7ad4
[i18n] Enable Arabic and Esperanto (#5515)
Unfortunately I missed that Arabic has had a few hundred translated strings for a couple of months now.

Cf. <https://github.com/koreader/koreader/issues/5359#issuecomment-544460031>.
2019-10-21 18:40:40 +02:00
Frans de Jonge
b8b6abe4d4
[fix] GetText: Support Arabic plurals (#5517)
Fixes <https://github.com/koreader/koreader/issues/5516>.

Cf. <https://github.com/koreader/koreader/pull/5515>.
2019-10-21 18:29:40 +02:00
poire-z
f05e62c1fb
TextWidget: small refactoring, better handle max_width (#5503)
Lots of code was doing some renderText calls to get the size
of some text string, and truncate it to some width if needed,
with or without an added ellipsis, before instantiating
a TextWidget with that tweaked text string.

This PR fixes/adds some properties and methods to TextWidget
so all that can be done by it. It makes the calling code
simpler, as they don't need to use RenderText directly.
(Additionally, when we go at using Harfbuzz for text rendering,
we'll just have to update or replace textwidget.lua without
the need to update any higher level code.)

Also:
- RenderText: removed the space added by truncateTextByWidth
  after the ellipsis, as it doesn't feel needed, and break
  right alignment of the ellipsis with other texts.
- KeyValuePage: fix some subtle size and alignment issues.
- NumberPickerWidget: fix font size (provided font size was
  not used)
2019-10-21 15:20:40 +02:00
Nick
ef22e85469 UI Changes (#5508)
* Changed File Browser text

KOReader looks nicer than KOReader File Browser,

* Remove the "page x of x" if only one page

Removes it from the bottom of the file browser

* Remove the "page x of x" if only one page

Removes it from the top menu, if there is only one page, why show page 1 of 1

* Renamed ~ to Home

Since the file browser can be considered "Home"

* Added 12 hour time option

Also tweaked the charging icon,  looks nicer than +, tweaked seperator between time and battery, - instead of @
2019-10-21 14:24:29 +02:00
Nick
daacb84114 [UX] Add timeout to Wi-Fi connected message (#5514)
Resolves #5501
2019-10-21 10:06:03 +02:00
Frans de Jonge
761f332d47
[doc] Update InputDialog example (#5510)
Make it work out of the box, add some cross-references, and update a few minor things.

In response to @dontcrash.

Cf. <https://gitter.im/koreader/koreader?at=5dac431978e4974ace8c4213>.
2019-10-20 16:43:28 +02:00
poire-z
7caa21a3fb [chore] Remove uneeded doc_settings:close() (#5504)
When just reading settings, no need to close and
write the file to disk.
2019-10-18 17:23:15 +02:00
poire-z
7de022a617
bump crengine: adds DOCX and FB3 support (#5498)
Includes:
- (Upstream) Unified cache for chars and glyph's indexes
- (Upstream) Glyph caching: optional use of hash table instead of a linked list
- (Upstream) Adds docx and fb3 support
- Update hardcoded elements list and stylesheets
- DocX: build a HTML DOM instead of a FB2 DOM
- Text: allow wrap after '/' and '-'
- Text: with Harfbuzz, split measurement on text node change
- Clear fonts on load and re-rendering
2019-10-17 15:17:35 +02:00
poire-z
240b75ac50
Fix screensaver menu stability (#5499)
With some particular document switching workflows, the
screensaver menu could lose its last item, and shrink
to having zero item, and eventually cause a crash.
2019-10-17 15:03:40 +02: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
Martín Fernández
87334801ea android: fix ko paths when primary storage is a SD card 2019-10-14 09:11:58 +02:00
Robert
40ba01fd72 Fix footer with no_mode/disabled progress bar (#5491) 2019-10-13 14:47:06 +02:00
NiLuJe
9f4ba77fab [Kobo] Always set the warmth on the KA1 (#5468)
It might be possible to instead only set the white led, but I don't
have the hardware to test that theory, se, eh.

Fix #5465 (probably.)
2019-10-11 20:37:18 +02:00
yparitcher
65fcd385c0 [chore] Fix typos (#5474) 2019-10-11 20:06:19 +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
poire-z
50f3aa252f cre progress meter: avoid some warning with unit tests (#5464)
Quick fix for some warnings shown in unit tests output, see https://github.com/koreader/koreader/pull/5406#issuecomment-540059452
2019-10-10 12:47:02 +02:00
Frans de Jonge
99495aaed4
[Android, fix] Revert slightly more of the Noto business (#5463)
Follow-up to #5458. Cf. https://github.com/koreader/koreader/issues/5381#issuecomment-539873843.
2019-10-09 17:03:51 +02:00
Martín Fernández
b75fec4971 tweak timeouts, add haptic feedback support
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2019-10-08 18:22:56 +02:00
yparitcher
8ed088159c [Plugin] Per directory defaults (#5428) 2019-10-08 17:14:38 +02:00
Max CW
a7ff9ba0dc ImageViewer: start with image fullscreen with no buttons shown (#5446)
Tap any part of screen to toggle bottom buttons visibility.
Swipe south to quickly close it (as long as image is scaled
to fit, and there's no need for panning).
2019-10-08 15:56:08 +02:00
Frans de Jonge
1db7f2e444
[fix] Try to make screensaver settings slightly less error-prone (#5460)
Regression inadvertently caused by #5369.

With the way this is constructed, this is almost guaranteed to happen.

Fixes #5459.
2019-10-07 17:46:09 +02:00
Frans de Jonge
0fa1b44782
[UX] Add … button to highlight edit (#5456)
Shows regular highlight dialog. Fixes #5455.
2019-10-06 23:47:53 +02:00
Mustafa Ali Mutlu
513fd807b0 Fix frozen confirmbox when keyboard shown (#5452) 2019-10-04 23:29:07 +02:00
Robert
7badb67e3d Fix crash on book status change (#5453) 2019-10-04 23:06:54 +02:00
poire-z
529d2d91d6
cre: properly unmark link position markers (#5451)
By restoring the previous content instead of just drawing
a white rectangle.
2019-10-04 23:04:58 +02:00
Robert
27de8d9bdf Fix: Footer overflow screen after resize emulator window (#5439) 2019-09-30 20:05:29 +02:00
Robert
056a4f9129 Fix: Crash toggleswitch when args are empty (#5438)
Fix: #5434
2019-09-30 11:18:39 +02:00
poire-z
3e3b00429f
EPUB: more support for RTL documents (#5436)
bump crengine: enhanced RTL block rendering.
Includes:
- Re-enable: Use the same FT load flags in HB as in FT
- Avoid redundant calls to getStyle()
- CSS: parse and store "direction:"
- Enhanced block rendering: handle RTL direction
- Enhanced block rendering: handle RTL tables
- Pagesplitting: account for lines' text direction
- CSS: add support for more pseudo-classes
- epub.css: a few updates for RTL documents
- Fix LVDocView::getBookmark() which could be slow or wrong

Add a few style tweaks useful to RTL readers.

Wikipedia Save as EPUB: build proper RTL documents from
persian, arabic, hebrew (and others) Wikipedia articles.
2019-09-29 23:02:54 +02:00
Frans de Jonge
f7861bc1eb
[feat] Add haptic feedback (#5380)
References <https://github.com/koreader/koreader/issues/5374>.
2019-09-29 15:42:05 +02:00
Robert
a934d2d52e [UX] Add fine tune for zoom(dpi) and font size (#5432)
Close: #5312
2019-09-27 12:58:40 +02:00
Frans de Jonge
d0f95ec669
[UX] Use ProgressWidget in frontlight (#5373)
This makes it behave like a pretty decent slider.

Cf. <https://github.com/koreader/koreader/issues/5314>.
2019-09-27 00:38:44 +02:00
NiLuJe
abc86323fc [Kobo/Cervantes] Always use setBrightness to set the brightness (#5429)
sysfs_light handles every case sanely already, no need to be cute ;).

This prevents always setting the warmth when setting the FL on NL
devices with a mixer, because, besides being useless, it's also slow
(lua does mmap'ed io, so every handle requires an fstat + mmap).

It was subtly affecting the fluidity of the toggle ramp, and much less
subtly wreaking havoc on #5373 ;).

KA1 owners might want to investigate keeping the fds around one way or
another, like we do for the fl ioctl, to alleviate the overhead of doing
that for not one but three or four fds...
I won't be doing that, since I lack the hardware to test it, and FL+NL
stuff is pain.

* Do the same on Cervantes

* Bump base to pickup related ioctl tweaks
2019-09-26 23:59:31 +02:00
Jörg Derungs
c8a6c144fa [fix] Make set defaults self contained (#5419)
Fixes #5418.
2019-09-26 23:13:35 +02:00
Robert
3de3ea04ff [UX] Better align buttonprogress in configdialog (#5427)
Similar to #5420
2019-09-26 11:46:23 +02:00
yparitcher
09d49e29ad [UX] Add inverse reading order to gesture manager (#5423)
Also fixes #5354.
2019-09-26 00:28:07 +02:00
Robert
67abf9a26a Better align toggleswitch in configdialog (#5420) 2019-09-25 19:44:57 +02:00
Robert
0778ec09fc Fix: incorrect chapter markers (#5425) 2019-09-25 19:40:00 +02:00
NiLuJe
e7cfc65780 [Kobo] Unbreak the FL ramp-up/down (#5421)
I got my wires crossed.

It's fast on Mk. 5, slow on Mk. 7.
So, slow it down on Mk. 5 so we actually get a ramp and not a jump.
2019-09-24 20:27:28 +02:00
Robert
02218cb9e2 [UX] Add fine tune in contrast (#5413) 2019-09-24 00:24:45 +02:00
NiLuJe
f96cfe940b
Use the proper LED driver on the Libra (#5416)
So that we can actually set the warmth ;)
2019-09-23 18:06:57 +02:00
yparitcher
31b9f78384 [UX] Add Hebrew keyboard (#5414) 2019-09-22 22:21:00 +02:00
NiLuJe
bcceb94603
Hotfix the startup orientation on the Kobo Libra (#5409) 2019-09-22 02:22:22 +02:00
NiLuJe
1c2c471c5f
[Kobo/Cervantes] Prefer using the ioctl over sysfs when setting the FL. (#5407)
* Prefer using the ioctl over sysfs when setting the FL.
It's much lower latency (re #5373).

We can do so on NL devices with a mixer.
2019-09-22 02:11:18 +02:00
poire-z
5bc6bf046c
bump crengine, show progress meter on load/re-rendering (#5406)
Includes:
- Adds tinyNodeCollection::getStatistics()
- epubfmt.cpp: cleanup indentation and small optimisation
- Add more progress callback events
- Optimisation: avoid re-init for EPUBs with embedded fonts
- Fix: don't draw border when border-color: transparent
- CSS: ignore 'inherit' inside font-family

Show a small progress meter at top left of screen when
crengine is loading, re-rendering, and saving cache file
(after a 2 second delay to not be bothered on small books).

Also add a wrapper for the last remaining bit of code that
was accessing _document directly (:getPageOffsetX()).
2019-09-21 18:59:05 +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
Frans de Jonge
d456a076af
[feat, UX] Ignore hold corners (#5404)
Closes <https://github.com/koreader/koreader/issues/5401>.
2019-09-19 16:51:47 +02:00
Robert
28e2e664b1 fix: Truncate text in spinwidget (#5393) 2019-09-19 11:54:53 +02:00
noEmbryo
fe9ab1c77c Move accented Greek characters to the "Accented" group (#5402) 2019-09-19 11:53:14 +02:00
Robert
8c1610b4e9 Fix: Incorrect width of separator line (#5403)
Fix: #5399
2019-09-19 11:51:55 +02:00
noEmbryo
6a2e4b7a08 Update el_keyboard.lua (#5400)
Set the Greek characters as the default

Cf. https://github.com/koreader/koreader/pull/5318#issuecomment-532705016
2019-09-18 18:50:33 +02:00
tobiasarndt
a2f605ba38 [fix] added PocketBook InkPad 3 Pro to device.lua (#5398) 2019-09-18 15:21:04 +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
e315d8690d [chore] Remove unnecessary indent on new line (#5391) 2019-09-17 14:27:51 +02:00
Robert
b7d464ae4b Set screenshot output folder (#5382)
Close: #4230
2019-09-17 13:01:40 +02:00
Frans de Jonge
5bc9700c24
[feat] Allow setting any document cover as screensaver (#5369)
Cf. suggestion by @KenMaltby in <https://github.com/koreader/koreader/issues/3033#issuecomment-526657352>.
2019-09-16 15:27:49 +02:00
poire-z
788e6d90df
Fix: don't create sidecar file when indexing pdf documents (#5384) 2019-09-16 08:22:26 +02:00
Robert
54568d4dcd [UX] Add fine tune in line spacing (#5375)
See https://github.com/koreader/koreader/issues/5312#issuecomment-528506421

Progress widget has a new extra button ⋮ that triggers SpinWidget.
2019-09-14 16:30:25 +02:00
Frans de Jonge
672d29fbcc [fix] WakeupMgr: pass through task epoch for proximity check 2019-09-14 16:27:54 +02:00
Frans de Jonge
0c290be055 WakeupMgr: add log when scheduling wakeup 2019-09-14 16:27:54 +02:00
Frans de Jonge
3836184f9d [Kobo] Always write scheduled wakeup info to log 2019-09-14 16:27:54 +02:00
NiLuJe
4363576066 Support the Kobo Libra
(Hopefully?).
2019-09-12 14:27:05 +02:00
Frans de Jonge
e257c4e45e
[feat, Kobo] Autoshutdown (#5335)
The methods used here will likely work on most embedded devices, which is why I put them in their own WakeupMgr interface/scheduler module, separate from Kobo.

See https://www.mobileread.com/forums/showthread.php?p=3886403#post3886403 for more context.

Fixes #3806.
2019-09-12 14:15:08 +02:00
Robert
9163a85b3c Messages in numberpicker widget (#5353)
See: #5342
2019-09-11 21:39:58 +02:00
Frans de Jonge
0dad707e2e
[fix, Kobo] Don't crash trying to sync frontlight with Nickel. (#5361)
When reasonably possible, the program should only crash in debug mode.

Adds a couple of extra unit tests to prevent regressions and adds docs.

Fixes <https://github.com/koreader/koreader/issues/5356>.
2019-09-11 18:11:24 +02:00
Robert
deaa5d98e6 Disable show chapter markers when progress bar is hidden in footer (#5345) 2019-09-11 17:56:26 +02:00
Frans de Jonge
6c93415f67
[fix] Filesearcher crash on empty file attributes (#5351)
Fixes <https://github.com/koreader/koreader/issues/5343>.
2019-09-09 18:39:36 +02:00
Frans de Jonge
ed4396821f
[fix] ReadSettings Inverse reading order (#5350)
`self.inverse_reading_order == nil and G_reader_settings:has("inverse_reading_order")` could easily be false, which would then incorrectly turn the setting off.

Fixes <https://github.com/koreader/koreader/issues/5346>.
2019-09-09 17:34:27 +02:00
Frans de Jonge
07116b9898
[fix] Add keyboard layout to filemanager menu (#5338)
Overlooked in <https://github.com/koreader/koreader/pull/5318>.
2019-09-07 20:49:44 +02:00
Frans de Jonge
59355200dc
[fix] PdfDocument: Hash collision (#5337)
A typo introduced in <https://github.com/koreader/koreader/pull/5282>.

This might resolve <https://github.com/koreader/koreader/issues/5323>, <https://github.com/koreader/koreader/issues/5327>.
2019-09-07 17:15:12 +02:00
NiLuJe
a3acc667d6
[Kobo] Restart KOReader after a crash (#5328)
* Restart KOReader after a crash, after showing a fancy crash recap screen (our very own Gray Screen of Death!).

Kobo only, because it's possibly the platform where getting booted out
of KOReader is the most annoying.

Keeps track of crashes, to be able to give up after a while, in order to
avoid boot loops in the unlikely event of a crash loop on startup.

Adds a dev option to *always* exit KOReader after the crash screen.
2019-09-07 03:19:18 +02:00
Frans de Jonge
872c145f3a
[fix] ReaderGesture: Use getCurrentNetwork().ssid (#5334)
Otherwise ffi/util.template crashes on a table.
2019-09-06 22:51:45 +02:00
Frans de Jonge
17e437dbd0
[UX] Allow keyboard layout selection (#5318)
Fixes <https://github.com/koreader/koreader/issues/3998>.

This isn't quite what I want but I've been letting this slip for
too long due to fancier keyboard interaction concepts.
2019-09-06 17:01:37 +02:00
Martín Fernández
20ebb55703 [Cervantes] Disable wifi before returning to QT, improved sysfs read (#5326) 2019-09-06 15:56:16 +02:00
NiLuJe
5f189beba9 You have failed this city! (#5321)
Switch two finger swipe icons to double arrows
2019-09-06 15:49:41 +02:00
Frans de Jonge
7019ff15bd
[chore] Drop SDL 1.2 (#5324)
Depends on https://github.com/koreader/koreader-base/pull/963.

Also includes Initial import of <linux/rtc.h> related stuff https://github.com/koreader/koreader-base/pull/965
2019-09-05 23:30:13 +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
Martín Fernández
cb2a3d9e72 Cervantes: Add back to stock reader (#5316) 2019-09-04 20:54:43 +02:00
Robert
ae50569055 Frontlight - Add checkbox use system settings (#5307)
See: https://github.com/koreader/koreader/issues/5205#issuecomment-526935357

Devices with `hasLightLevelFallback = true` (for now Android) has extra checkbutton `Use system settings`. Default unchecked.
2019-09-04 20:52:24 +02:00
Frans de Jonge
2cd9b50137
[Android] Don't ship Noto (#5310)
Follow-up to <https://github.com/koreader/koreader/pull/5252>. This greatly reduces the Android package size.

See discussion in <https://github.com/koreader/koreader/pull/5264#issuecomment-525517001>.
2019-09-04 20:50:25 +02:00
NiLuJe
d66cf7ab61 [fix] Allow setting a fine-tuned font size as default (#5306)
And a couple bugfix this unearthed:

* Always set the default as the *current* value, no matter what (by chance, this was not an issue for margins).
* Don't crash on the hold gesture in the -/+ buttons for the horizontal margins (regression since #5303).
2019-09-03 13:41:15 +02:00
Frans de Jonge
b2554ba5da
[fix] Prevent crash when no page boxes (#5289)
Can occur with invalid page numbers, for example by changing the font size in a reflowable MuPDF document.

Discussion in <https://github.com/koreader/koreader/pull/5282#issuecomment-526842921>.
2019-09-01 22:17:15 +02:00
Frans de Jonge
49589901b1
[fix] Let UIManager handle suspend logic (#5304)
See <https://github.com/koreader/koreader/issues/2431#issuecomment-526925910>.

Supersedes <https://github.com/koreader/koreader/pull/5302>.
2019-09-01 21:37:08 +02:00