Commit Graph

61 Commits (24424e505eab617949ed34e8d4bf8c1a2d4097cc)

Author SHA1 Message Date
poire-z 24424e505e Update UI layout code to use new SVG icons
- Add IconWidget, use it for icons instead of ImageWidget.
  Specify icons by name only, look for them (with either
  .svg or .png suffixes) in multiple directories (including
  koreader/settings/icons/ to allow customizing them).
  Don't crash when icon name not found, shown a black
  background warning icon instead.
- Don't trust the icons' native sizes: replace
  scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
  so all icons get the same (tunable) size - except in
  a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
  properly centered in them, extend vertical line
  separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
3 years ago
jperon 1f16815f94
[chore] Get rid of ui/data/strings.lua (#6921)
As suggested [here](https://github.com/koreader/koreader/pull/6885#issuecomment-734865881)
3 years ago
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
4 years ago
poire-z 1e244d0358 [UX] Add fine tune for Word Spacing
Using DoubleSpinWidget.
Also keep SpinWidgets open on Apply.
Added little trick: if widget has been moved, close
bottom config menu on next Apply to show more of
the book.
4 years ago
poire-z 8991540462
Reorganize bottom menu config panels (#6131)
Mostly for the PDF bottom menu.
- Reorganize by topic, trying to limit the number
  of widgets per panel to 4.
- Re-order some toggles from low to high ('off' then 'on').
- Show font size as number instead of a list of "Aa".
- PDF: add more font size values, and increase usable
  contrast values.
- Add help_text to most PDF toggle titles.
- CRE line spacing: increase fine tuning min and max.
Also avoid zoom advice messages on book load.
4 years ago
poire-z e074b603e0 Adds Word Expansion: use of letter spacing for justification
Bump crengine:
- Text: fix occasional BiDi bad word splitting
- Font: fix HB fallback measurement/drawing mismatches
- Font: do not add letter spacing on diacritics
- Text: tunable use of letter spacing for justification
- Text: dont adjust space after initial quotation mark/dash (rework)
- Text: fix possible bad widths after collapsed spaces

xtext.cpp: pick crengine fix with HB fallback
measurement/drawing mismatches

Adds "Word Expansion" to bottom Font size menu, and moved
"Word Spacing" there too, to balance the panels' heights
to 4 items.
4 years ago
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.
4 years ago
Robert d93206a841 Remove DCREREADER_PROGRESS_BAR (#5641) 5 years ago
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).
5 years ago
Robert a934d2d52e [UX] Add fine tune for zoom(dpi) and font size (#5432)
Close: #5312
5 years ago
Robert 02218cb9e2 [UX] Add fine tune in contrast (#5413) 5 years ago
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.
5 years ago
Robert b038fa3046 [UX] Add fine tune buttons to horizontal margins (#5303)
Similar to top and bottom margins I add fine tune buttons to L/R margins.
5 years ago
Frans de Jonge da988c15de
[CI] Switch to custom xgettext build to extract multiline strings (#5242)
Because let's face it, it just looks much better this way.

Docker image update in https://github.com/koreader/virdevenv/pull/43

Discussion in https://github.com/koreader/koreader/pull/5238#issuecomment-523675211 and https://github.com/koreader/koreader/pull/4524
5 years ago
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
poire-z 9f3c85ed83 cre: toggable enhanced rendering (floats, collapsed margins...)
Adds "Render mode" toggle with 4 modes, to enable some or all
of crengine's new enhanced block rendering features.
Use "legacy" rendering for previously opened books to not mess
with bookmarks, and "web" (all of the new features) for new books.

Also make available the added "HTML5" stylesheet to the Style menu.
5 years ago
NiLuJe 4ccb1f3dd5
Allow disabling automagic image inversion in Nightmode in CRe (#5095)
* Allow disabling automagic image inversion in NightMode

Fix #4986
5 years ago
poire-z 7c53fcd922 CRe margins: hide bottom menu on change (#5000)
So we can immediately see how's the bottom margin.
5 years ago
poire-z bf07c44009
CRe margins: add toggle to sync top and bottom margins (#4990)
Also fix DogEar size update on margin change.
Also re-order cre bottom tabs to be like with kopt.
5 years ago
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 ;).
5 years ago
NiLuJe 9134594119
Allow toggling CRe's new dithering & scaling (#4922)
Smooth scaling toggle is per document, in the gear tab.
Dithering is in the Dev top menu ;).
5 years ago
NiLuJe 645d41eda9
Add more granularity in line-height settings with CRe (#4785)
70 -> 130, in steps of 5 ;).
5 years ago
poire-z ce3d181e24
cre 2-pages: rename toggle to "Dual Pages" (#4788) 5 years ago
poire-z 22bc9dacb5 cre landscape view: adds 1 page / 2 pages toggable
Adds a toggle switch in the Orientation bottom config menu to
allow showing 1 page or 2 pages when in landscape mode.
Previously, this was hardcoded to be in 2-pages modes only
in some circumstances (device resolution + user dpi).
5 years ago
Qingping Hou bf40b5d5e6 avoid assigning screen as local variable in creoptions 5 years ago
Qingping Hou 9e57e56f95 decouple UI definitions from document modules 5 years ago
Frans de Jonge 1d1dc74290 [UX] creoptions: add more margin values
Fixes #4684.
5 years ago
poire-z 19280078de bump crengine: Harfbuzz light, WTF-8, corrupted ZIPs
Includes:
- EPUB: workaround ZIP files with corrupted central directories
- Supports book text encoded in WTF-8
- Harfbuzz kerning (full): fix possible wrong flags
- (Upstream) Adds new kerning method: Harfbuzz light, without ligatures

Adds Harfbuzz light kerning methods as the 3rd toggle.
5 years ago
poire-z 6f2368e3bc
cre: configurable kerning method (off/freetype/harfbuzz) (#4167)
Bump base & crengine for HarfBuzz support.
6 years ago
poire-z a08416d2f8
Add some help texts to long press popup on bottom config titles (#4048) 6 years ago
sebastien 71ff69ec4f cre word gap: use values from defaults.lua (#4045) 6 years ago
poire-z d8e58a08fd
bump crengine: adds support for dpi-based css units (#4040)
Adds a new toggle to the bottom menu: Zoom (dpi), which
allows for scaling CSS absolute units and image sizes.
6 years ago
Robert d29a65b96e cre: add Word Gap setting to bottom config panel (#4026)
Maps to crengine's Space Condensing feature (named Word Gap
as a similar feature is named for PDF)
6 years ago
Robert 895372f781 Show current and default values in config dialog (pdf) (#3973) 6 years ago
Robert 693bb84084
Fix show current and default values in config dialog (#3961) 6 years ago
Robert da65db191b Show current and default values in config dialog (epub) (#3952)
when long-press on the title strings on the left of the buttons
6 years ago
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
poire-z c93bbec40d
cre: more constrast settings (#3737)
Use ButtonProgress like it was done for kopt.
6 years ago
poire-z 8360164e24 Use toggle for CRE Contrast in bottom menu (#3490) 7 years ago
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
7 years ago
poire-z 75b7c4b524 Added Font Hinting toggle (#3182) 7 years ago
poire-z 774d2345e0 Added Embedded Fonts config toggle
Just under the existing "Embedded Styles". Support for this
was already there in crengine, and interfacing is similar to
what is done with Embedded Styles.
7 years ago
chrox 4c491b5ee2 rename 'Highlight' to 'Highlight options' in menu
This should fix #2023.
8 years ago
Zijie He 1aa0c4192a Multi-line toggle switch & add instruction to resolve sdcv build error. 8 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
chrox 30898a3cd8 config line space/font gamma values directly 10 years ago
chrox 803e4e8600 font weight option should be persistent between launchings
This should fix #620.
10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 4fcb39494c use mini progress bar by default 10 years ago
chrox 9f507e6447 add 'full/mini' options for progress bar of crereader 10 years ago