Commit Graph

20 Commits (master)

Author SHA1 Message Date
zwim 4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2 years ago
NiLuJe eef938996f MultiDialog: Fix an extremely nasty API misuse
Stuff was poking at the class object, not the instance's :s.

Fix #9599
2 years ago
Philip Chan 107156c0a8
[feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2 years ago
hius07 859327dea5
Input dialogs: keep size in rotation (#8223) 3 years ago
NiLuJe bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
3 years ago
Galunid 9fa043e227
Use already entered values instead of defaults if not specified in perception expander (#6518) 4 years ago
yparitcher 783103b488
Perception expander: disable margin increase when set to 0 (#6377)
Closes #6376
4 years ago
NiLuJe 1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
4 years ago
limerainne 8fdb7483a2 [fix, plugin] Change perception expander plugin behaviors (#5051)
* Landscape status not detected when reloading document
* Settings are mostly not applied immediately; have to flip page to see effects
5 years ago
poire-z 850be52177
Keep some menus open when Tap or Hold (#4189)
TouchMenu: added options to menu items with the following defaults:
    keep_menu_open = false
    hold_keep_menu_open = true
So, default for Tap callback is to close menu, and for Hold callback
to keep menu open.
In both cases, provide the TouchMenu instance as the 1st argument to
the callback functions (instead of a refresh_menu_func I added in #3941)
so the callback can do more things, like closing, refreshing,
changing menu items text and re-ordering...

ReaderZooming: show symbol for default (like it was done for
ReaderFont, ReaderHyphenation...)
TextEditor plugin: update the previously opened files list in real
time, so the menu can be kept open and used as the TextEditor main
interface.
SSH plugin: keep menu open and update the Start/Stop state in real time
ReadTimer plugin: tried to do what feels right (but I don't use it)

Also remove forgotten cp in the move/paste file code
6 years ago
Robert 5344e0b672 [Fix] Don't load disabled plugins (#4169) 6 years ago
Robert 4428ecb422 Plugin manager (#4159)
Also adds descriptions to all plugins.
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
cramoisi ac3325fb95 [typo] PerceptionExpander: main.lua fix typo (#3747)
correcting a typo (as requested by @Frenzie) in line 18  name = "percepton_expander", =>     name = "perception_expander",
6 years ago
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge 8f31a81601 MenuSorter: some documentation
MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
7 years ago
Frans de Jonge 5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
7 years ago
Frans de Jonge 9e14fcc748 Fix "line thick" typo to "line thickness" (#2482)
Thanks to @kingu on Transifex.
7 years ago
poire-z fc8d26ad89 Remove unnecessary PerceptionExpander:onSaveSettings()
All the explicite self:saveSettings() needed are done when needed,
and this onSaveSettings() made the file being rewritten unchanged on
each suspend/exit, and created even if people have never used the
plugin.
7 years ago
Alexander Pletnev 2bc1be9956 #2447 Perception expander plugin (Improve peripheral vision) (#2455) 7 years ago