Commit Graph

27 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
Robert dc6d4085ea Fix: Unable to hold top right corner in FileManager (#5248)
Close: #5247
5 years ago
Frans de Jonge 8466af2c5b
[UX] Gesture manager: corner gestures (#4878)
Adds configuration to the top corners as well as the additional gestures hold and two-finger tap.

Deprecates `DTAP_ZONE_FLIPPING` and `DTAP_ZONE_BOOKMARK`.

Fixes #4877.
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 5871132c25
UI Behavior tweaks (#3983)
* Switch all initial highlights to "fast" update

i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130

* Tweak refreshtype for a number of widgets:
  * Fix iconbutton dimen
  * Make touchmenu flash on close & initial menu popup. Full-screen on close.
  * Use flashing updates when opening/closing dictionary popup. Full-screen on close.
  * Switch FileManager to partial.
    It's mostly text, and we want flash promotion there.
  * Make configdialog & menu flash on exit
  * Make FLWidget flash on close
  * virtualkeyboard: flash on layout change & popup.
  * Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
  * Flash when closing BookStatus Widget
  * Optimize away a quirk of the dual "fast" update in touchmenu

* Promote updates to flashing slightly more agressively.

* Document what each refreshtype actually does.

With a few guidelines on their optimal usecases.

* Switch remaining scheduleIn(0.0) to nextTick()

* Tighter scheduling timers

Shaving a hundred ms off UI callbacks...

* Cache FFI C Library namespace

* Ask MuPDF to convert pixmaps to BGR on Kobo

Fix #3949

* Mention koxtoolchain in the README

re #3972

* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity

* Make black flashes in UI elements user-configurable

(All or nothing).

* Jot down some random KOA2 sysfs path
6 years ago
onde2rock e8aab49ee9 Kindle4NT improvements (#3745)
* [device][kindle4] add fake event to kindle4

* modify focusmanager to allow for more complex layout

The focusmanager now naviguate the layout by avoiding nil value
instead of relying on table lenght. It should be completely backward
compatible

* add Dpad naviguation to the touchmenu

* fix crash because virtualkeyboard on non touch device

the kindle4NT has no keyboard nor touch, the fix open the virtual
keyboard so koreader dont crash but it's not useable

* Enable device with keys to use the touchmenu

* Don't get stuck in reader progress statistics plugin

* [underlinecontainer] Fix and remove unused function

References #1898.
6 years ago
Robert 227584de22 New option - create new directory (#3555) 6 years ago
poire-z f90973f73a Allow for disabling flashing of menu, icons and buttons (#3339) 7 years ago
Frans de Jonge 0d7999e7a5 [fix] Add hold_callback to IconButton (#3271)
Also fix path display update.

Fixes #3270.
7 years ago
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.
7 years ago
Frans de Jonge 36478262bf [UX] Smaller top menu icons (#3253) 7 years ago
poire-z bccbf95080 Add horizontal_padding to IconButton (#3213)
TouchMenu (top menu) and ConfigDialog (bottom menu) updated
to make use of that. This provides a wider sensitivity to
menu buttons.
7 years ago
Frans de Jonge bb70ae9eaf Dev docs: some widgets 7 years ago
poire-z 7166efd777 ImageViewer: added zoom & pan via gestures
ImageWidget: removed 'autostretch' setting (replaced by scale_factor=0)
and renamed 'autoscale' setting to 'scale_for_dpi'.
7 years ago
NiLuJe 50dbf6b581 Switch a few widgets to ui refresh modes
More closely matches native behavior on REAGL devices.
Closing those widgets should still trigger a partial refresh though,
because we usually get back to the reader, and text, so we want REAGL
;).
9 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox f52872b081 default autoscale for IconButton 10 years ago
NiLuJe e9573ebe58 Try to avoid more update_regions_func mismatches
scheduling tricks
10 years ago
NiLuJe 7a812ff86d Make Button update regional 10 years ago
NiLuJe 041f11cba0 Tweak some comments 10 years ago
NiLuJe 8f3598bec3 Make IconButton updates regional
Beginning of the quest to make menu refreshes slightly smoother ;).
10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
Qingping Hou ad704fa9c2 give a better name for parent 11 years ago
Qingping Hou eaf43dc30b add go back button to touchmenu 11 years ago
Qingping Hou e0813ad789 return true on iconbutton click event 11 years ago
Qingping Hou b4c5f28164 add iconbutton widget 11 years ago