Commit Graph

60 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
poire-z a0eb91d6ab
Some RTL UI fix up after #6885 (#6975)
Avoid crash with RTL UI after options we moved.
Swap Zoom direction items when RTL UI.
Also don't check show_func when sizing the names
on the bottom menu, to avoid icons moving or
resizing when toggling options.
3 years ago
Frans de Jonge 908e3ae363
[chore] Don't translate numbers (#6928)
Cross-ref to <https://github.com/koreader/koreader/pull/6885>.
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
jperon 8eeb010dc9
Paged documents: rework zoom options (#6885)
- Move zoom options from top menu to bottom config
- Add option to manually define zoom (relative to
  page width) and overlap (in percent)
- Add options to zoom to columns or rows, possibly
  with overlap. Add panning direction options when
  page forward in these modes
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 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
Robert 73a0f2f9d1 Remove DSCROLL_MODE and DGLOBALGAMMA (#5754) 4 years ago
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.
4 years ago
Mustafa Ali Mutlu 12adb96206 [feat] Option to change page gap in continuous mode (#5705)
Fixes #5656.
4 years ago
Robert c3a0bd4def Remove DFULL_SCREEN (#5695) 4 years ago
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
4 years ago
Frans de Jonge f1f6eebce0
[feat] Add MuPDF EPUB/FB2 dynamic font size (#5282)
Closes #4368.
5 years ago
Frans de Jonge ac15143c14
[lang] Rename 'Scroll Mode' to 'Continuous' (#5169)
The current name causes people to think of scrolling, which is slightly awkward on E Ink. For example, see <https://github.com/koreader/koreader/issues/5166#issuecomment-517771475>.

> But this on LCD, not E-ink where the lag is unbearable, especially if you want to correct any scrolling over/undershoot.

Scroll mode is a misnomer. It should be renamed continuous. I use "scroll mode" as the default, but I seldom or never scroll. Conversely, you can still scroll in paged mode if a page is longer than the screen. As far as I'm concerned if you're scrolling (panning) you may be doing it wrong, but to anyone reading: you do you. ;-)
5 years ago
poire-z c060595580
ConfigDialog: fix ButtonProgressWidget and some refreshes (#4793)
This internal ButtonProgressWidget widget was behaving
differently from all others (OptionTextItem, OptionIconItem
and ToggleSwitch) by duplicating some code from
ConfigDialog:onConfigChoose() instead of calling it directly.

While making it similar to others, I noticed that onConfigChoose()
did a full repaint, which was necessary for some settings to
be applied (ie: Contrast).
On CreDocument, this full repaint may cause some double drawing
on config changes (ie: Margins, drawing once after margin changes,
and then re-positionning to previous xpointer).
So, make the need for full repaint a condition on KoptOptions.
5 years ago
Frans de Jonge c1b4085b93
[UX] Add cropping: none mapped to page width zoom (#4696)
Fixes #1923.
5 years ago
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)
5 years ago
NiLuJe f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
5 years ago
poire-z a08416d2f8
Add some help texts to long press popup on bottom config titles (#4048) 6 years ago
Robert 895372f781 Show current and default values in config dialog (pdf) (#3973) 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
Robert 0def547162 More contrast settings (#3463)
Close: #2133 
More info: #2133
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
chrox 551857ce6e fix some luacheck warnings 8 years ago
Zijie He 1aa0c4192a Multi-line toggle switch & add instruction to resolve sdcv build error. 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
chrox 72012e97e1 disable reflow options when reflow is not ON
This should also fix #1061.
9 years ago
chrox 83cad1c61c larger page margin as a workaround to fix #1422 9 years ago
chrox 3574865dcb fix #1166 by auto alignment of option name 10 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 fe14809bdf update mupdf and k2pdfopt to latest versions 10 years ago
chrox d7fa72e46c negative x panning if writing direction is set right to left
so that in right to left writing/drawing system the right part
of the page is drawn first
10 years ago
chrox b83c4c3d95 hide several koptoptions in advanced mode 10 years ago
chrox 120f18737e add advanced option forced_ocr to force ocring text 10 years ago
chrox 0fdba1ff35 remove least used koptoptions to save space for small screens 10 years ago
chrox a9b9e7f087 mv columns and text align options to 'Layout' panel 10 years ago
chrox 1d292f16a9 remove full screen option in koptoption
since we can now switch progress bar status simply by tap
10 years ago
chrox c6c4cbcab1 add dewatermark option for pdf/djvu documents 10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 9f507e6447 add 'full/mini' options for progress bar of crereader 10 years ago
chrox 7247a9e3a2 add writing direction option when reflowing
This probably will fix #195.
11 years ago
chrox 90d55cbde4 set auto detect word gap in reflowing by default 11 years ago
chrox 4cfdce6105 fix several local calls of Math.round 11 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
chrox 3e94520e53 add width param in ToggleSwitch 11 years ago
chrox f32e9e4548 change medium and large defect sizes to 3.0 and 5.0 respectively 11 years ago
chrox 6dc53df5b5 word gap is set to smallest when selcting CJK languages 11 years ago
chrox 1808c7e5c3 add document language option in config dialog
Document language setting is used for better text extraction and OCR.
11 years ago
{Qingping,Dave} Hou 8c8977567c Merge pull request #156 from chrox/landscape_ori
toggle landscape will change orientation for landscape mode
11 years ago
chrox c19de743ba toggle landscape will change orientation for landscape mode 11 years ago