Commit Graph

54 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)

Author SHA1 Message Date
NiLuJe 930286d3f5 Slightly prettier virtual keyboard (#4776)
Add a thin border around keys (square)
5 years ago
Qingping Hou 634fed5487 use device instead of canvascontext in UI modules 5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou 02eca23649 decouple device from document modules 5 years ago
NiLuJe 81b255cb85 Better-than-nothing key repeat handling.
Mainly aimed at the Forma.
Still fairly terrible, as these things goes ;p.
5 years ago
Robert dc5a479b66 Gesture manager (initial) (#4240)
Manager supports separate gestures for the file manager and the reader. Gestures from the manager have a higher priority than built-in gestures.

Settings available in Gear -> Device -> Gesture manager
6 years ago
onde2rock e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
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
poire-z e7f705bf10 Fix some issues with movable dict window (#3722)
Some Hold and move (hold on title and move away from it) would not work.
Pan (=swipe with hold at end) while selecting text would move the
window (it now does nothing: proper text selection still needs Hold
on word at start).
Also increase hold duration from 2s to 3s (for switching lookup
between dict/wikipedia) to be consistent with the 3s duration in
readerhighlight.
6 years ago
Robert 39738955f3 File manager: added 'Go to letter' (#3664)
When Hold on page number, allows for inputing letters to go to file
starting with them (and not only numbers to go to page number).
6 years ago
poire-z 43a6cf4b2e Add MovableContainer: allow moving some widgets (#3636) 6 years ago
Frans de Jonge 2538189473
[doc] WidgetContainer: fix some typos 7 years ago
poire-z 9443098e98 Normalize some widgets appearance (those using ButtonTable)
This makes button heights similar in all uses of ButtonTable.
It depended on how the ButtonTable was used in each widget
(previously, first and last row may have different sizes than
the others).

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

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

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

Additionaly: frontlightwidget.lua: fixed width of progress bar that
was exceeding window width since the Size scaling adjustements
7 years ago
Frans de Jonge a6be301695 Added Size module 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
Robert 85e2140ced Show position on config panel (#3194) 7 years ago
Frans de Jonge bb70ae9eaf Dev docs: some widgets 7 years ago
Qingping Hou 15fd7fc0ff bring back support for disabling progressbar in footer (#2753)
* footer(optimize): remove dead code

* footer(fix): disable auto refresh time option when current time is not checked

* fix: support disable progress bar again
7 years ago
Frans de Jonge e8721887ba InputContainer: add cancel_text and ok_text
Makes it easier to comply with UX style.

* Change "OK" to "Search dictionary" in Dictionary lookup to comply with UX style
* Change "OK" to "Search all text" in Fulltext search to comply with UX style

Tacked on but highly related:

* change "OK" to "Search Wikipedia" in Wikipedia lookup to comply with UX style
* change "OK" to "Set default" in ConfigDialog to comply with UX style

Chore:

* fixed up order of requires
7 years ago
Qingping Hou 9b7aba3fba fix: override readerhighlight hold in readerfooter
Also fix touch zone dependency graph generation code.

ReaderHighlight has now been migrated to use touch zone

Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
7 years ago
poire-z 0577fde59e Better tracking, management and freeing of BlitBuffers
This should fix the most obvious memory leaks (noticable when
using images as screensaver).
ImageWidget: added a few more options needed by ImageViewer,
and removed 'overflow' option as logic was wrong.
7 years ago
Qingping Hou 33367d3a6c inputcontainer(fix): update gesture range on screen resize properly 8 years ago
Frans de Jonge ba7377065e Doc: miscellaneous improvements. 8 years ago
Qingping Hou 09564d4b4d doc: event propagation for widgets 8 years ago
Qingping Hou 11f55d2aff doc: Event and WidgetContainer 8 years ago
Qingping Hou 0c49b915de refactor: add touch zone subsystem to inputcontainer
Touch zone decouples screen size from gesture event registration.

The win here is each individual widget does not need to update
gesture range on screen rotate/resize anymore.

Another advantage is we now have a centralized ordered array to handle
all registered touch event listeners, makes it much easier to resolve
gesture range conflicts between multiple widgets.

This patch also includes the following changes:

* migrate readerpaging to use readerui's touch zone
* migrate readerfooter to use readerui's touch zone
* move inverse read direction setting to touch menu's setting tab
* moved kobolight widget from readerview into readerui
* various dead code cleanups and comments
8 years ago
Qingping Hou e58198fbe2 widgetcontainer(fix): crash when getting widget size 8 years ago
Qingping Hou 476e35708d inputdialog(feat): add is_enter_default attribute to buttons 8 years ago
Qingping Hou 60587e08c6 defaults(refactor): remove global hack in filemanagersetdefaults
also added screensaver folder setting dialog for kobo
8 years ago
chrox f3e0d44cc4 disable jit on some modules on android
to make koreader on Android  more stable

and with these opt params:
```
require("jit.opt").start("sizemcode=64","maxmcode=64", "hotloop=10000")
```

The strategy here is that we only use precious mcode memory (jitting)
on deep loops like the several blitting methods in blitbuffer.lua and
the pixel-copying methods in mupdf.lua. So that a small amount of mcode
memory (64KB) allocated when koreader is launched in the android.lua
is enough for the program and it won't need to jit other parts of lua
code and thus won't allocate mcode memory any more which by our
observation will be harder and harder as we run koreader.
8 years ago
Qingping Hou 8e35a6e4ab fix inputcontainer 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
Qingping Hou 8f4fae7a09 minore: more static check fixes 8 years ago
Qingping Hou 5a3b9c6856 style: make staick-check happier 8 years ago
Qingping Hou 0a492bee3c add(ui): topcontainer 8 years ago
Qingping Hou 68ead0c9b2 feat(inputcontainer): support showing inputcontainer without content 8 years ago
chrox 394c9cf948 fix dimen returned by getSize used as dimen in inputcontainer 9 years ago
chrox 9e91512f5f add custom sync server option in Kosync plugin
This should fix #1619.
9 years ago
Qingping Hou a62e7ee34c feat: add keyboard support for button table 9 years ago
Qingping Hou 63e88baf33 fix: stop self.dimen polution for inputcontainers
Without this fix, self.dimen is shared among all inputcontainers
intances, which breaks some of the UI rendering. All widget should
set/initialize their own self.dimen in self:init() method.
9 years ago
chrox ebdd374c93 Add 'input page number' function in filemanager
by holding on the page info label at the buttom of the filemanager
9 years ago
chrox 72012e97e1 disable reflow options when reflow is not ON
This should also fix #1061.
9 years ago
variousvirgil 9c69c1f14e Fix #1299 10 years ago
Hans-Werner Hilse 5982e24d57 unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
10 years ago
Hans-Werner Hilse e47b43e8b5 add implementation of a container widget with alpha-blitting
This is a container that will honor a given alpha value (0..1)
when painting, so it will be translucent for values < 1.
10 years ago
Qingping Hou 5e035c2517 fix(ui): hide button framecontainer background in hide() method 10 years ago
chrox d34a7fb355 lookup input word when holding on word in dict lookup window 10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox f12d8eb9b4 add align field in WidgetContainer 11 years ago
chrox 5b31076025 calculate widgetcontainer dimension if not given 11 years ago