Commit Graph

42 Commits (859327dea58cfa2b3c634b5ae4ecc1008b8c6f23)

Author SHA1 Message Date
hius07 859327dea5
Input dialogs: keep size in rotation (#8223) 3 years ago
NiLuJe 525b1957b9
[RFC] Pagination UI shenanigans (#7335)
* Menu/KeyValuePage/ReaderGoTo: Unify the dialogs. (Generally, "Enter page number" as title, and "Go to page" as OK button).
* Allow *tapping* on pagination buttons, too. Added spacers around the text to accommodate for that.
* Disable input handlers when <= 1 pages, while still printing the label in black.
* Always display both the label and the chevrons, even on single page content. (Menu being an exception, because it can handle showing no content at all, in which case we hide the chevrons).
* KVP: Tweak the pagination buttons layout in order to have consistent centering, regardless of whether the return arrow is enabled or not. (Also, match Menu's layout, more or less).
* Menu: Minor layout tweaks to follow the KVP tweaks above. Fixes, among possibly other things, buttons in (non-FM) "List" menus overlapping the final entry (e.g., OPDS), and popout menus with a border being misaligned (e.g., Calibre, Find a file).
* CalendarView: Minor layout tweaks to follow the KVP tweaks. Ensures the pagination buttons are laid out in the same way as everywhere else (they used to be a wee bit higher).
3 years ago
poire-z 3b89e32069 [UX] Add ToC/Bookmarks settings
- Menu widget: allow specifying the number of items per
  page and the item font size, so we can use other values
  than the default File browser ones
- Menu: fix setDirty when a border is used
- ToC: add item per page and font size settings, make
  Alternative ToC more visible (was previously
  available on long-press on Table of contents)
- Bookmarks: add item per page, font size, size reduction
- Progress bars (Skim widget and footer): allow selecting
  ToC depths from which ticks are made.
3 years ago
NiLuJe df0bbc9db7
Tame some ButtonTable users into re-using Buttontable instances if possible (#7166)
* QuickDictLookup, ImageViewer, NumberPicker: Smarter `update` that will re-use most of the widget's layout instead of re-instantiating all the things.
* SpinWidget/DoubleSpinWidget: The NumberPicker change above renders a hack to preserve alpha on these widgets almost unnecessary. Also fixed said hack to also apply to the center, value button.

* Button: Don't re-instantiate the frame in setText/setIcon when unnecessary (e.g., no change at all, or no layout change).
* Button: Add a refresh method that repaints and refreshes a *specific* Button (provided it's been painted once) all on its lonesome.

* ConfigDialog: Free everything that's going to be re-instatiated on update
 
* A few more post #7118 fixes:
  * SkimTo: Always flag the chapter nav buttons as vsync
  * Button: Fix the highlight on rounded buttons when vsync is enabled (e.g., it's now entirely visible, instead of showing a weird inverted corner glitch).
  * Some more heuristic tweaks in Menu/TouchMenu/Button/IconButton
* ButtonTable: fix the annoying rounding issue I'd noticed in #7054 ;).

* Enable dithering in TextBoxWidget (e.g., in the Wikipedia full view). This involved moving the HW dithering align fixup to base, where it always ought to have been ;).

* Switch a few widgets that were using "partial" on close to "ui", or, more rarely, "flashui". The intent being to limit "partial" purely to the Reader, because it has a latency cost when mixed with other refreshes, which happens often enough in UI ;).

* Minor documentation tweaks around UIManager's `setDirty` to reflect that change.

* ReaderFooter: Force a footer repaint on resume if it is visible (otherwise, just update it).
* ReaderBookmark: In the same vein, don't repaint an invisible footer on bookmark count changes.
3 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
Jörg Derungs c8a6c144fa [fix] Make set defaults self contained (#5419)
Fixes #5418.
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Robert 6220d05a34 Fix focus/unfocus in MultiInputDialog (#4060)
Also fix size of window DCREREADER_CONFIG_FONT_SIZE
in Advanced settings
6 years ago
Frans de Jonge 9fa493c0d3
[fix] AppImage advanced settings location (#3866)
Reported on the forum by roger64: https://www.mobileread.com/forums/showthread.php?t=296184
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
Robert d163f8281d Menu: configure number of items per page, wrap entries (#3589)
Configure number of items per page (from 6 to 24) - default is 14
Allow filenames to wrap so that we can see the full name
Used by File browser, History, Search Result, Bookmarks, Table of contents (only single line), File chooser, OPDS catalog
6 years ago
robert00s dfba135f10 Fix: Advanced settings crashes 7 years ago
Frans de Jonge e1aa57f27e Font: unify font styling 7 years ago
Hzj_jie f91ad679d9 swithItemTable -> switchItemTable 7 years ago
Qingping Hou 67ae10742a defaults: try parse int from user input 8 years ago
Qingping Hou d6c48b06f9 chore: fix all luacheck issues 8 years ago
Qingping Hou 252100891f fix(defaults): override defaults with persistent defaults for advanced setting menu 8 years ago
Qingping Hou ca21ab4be5 fix(defaults): type casting for user input 8 years ago
Qingping Hou 0d9fc17d7c chore: rename SetDefaults:SaveSettings 8 years ago
Qingping Hou 9586b36eb6 defaults(fix): purge entry from persistent file 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
Allan Nordhøy bc16ed5035 Spelling of calibre and KOReader. Ellipsis. 8 years ago
chrox 34ea9ac574 add datastorage module to handle data directory on various platform
On kindle, kobo and pocketbook the data directory is the current
running directory but on Android the app is installed in system
defined location and users may have no access to that location.
The same circumstances should be true for the upcoming Koreader for
Ubuntu touch, so the data directory (in which tessdata, dictionaries,
global settings, persistant defaults and probably history data are
stored) could be stored in another place.
9 years ago
chrox b3d79b053a workaround to fix #1340 10 years ago
Frans de Jonge fcb59bfd30 Improved SetDefaults dialog message. 10 years ago
Frans de Jonge ff4e2f3458 Minor English improvements. 10 years ago
chrox 03ee6630cf fix #1096 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 69c162ac4f refactoring to generic multiinputdialog 10 years ago
chrox 5890e4a0b1 use conventional util name and update koreader-base 10 years ago
WS64 4bad1a6f6f New editor for table fields used 10 years ago
WS64 6c603bf9ad remove global variable 10 years ago
WS64 9b6d273c66 Bugfix. Latest version just allowed you to enter the editor once 10 years ago
WS64 f99f18ee13 Just save settings that really were changed
And not also settings that are different from the ones loaded.
This prevents Koreader from overwriting your complete persistent.defaults.settings when you started Koreader with a malformated persistent.defaults.settings file and choose "save settings". In such a malformated case you just can edit the damaged setting and save it back (although you can't see which one is damaged since the defaults settings are taken)
10 years ago
WS64 d5b35e8547 Default Settings finally also with the array fields 10 years ago
WS64 0a6fbe28e3 Reaarange cancel buttons to the left 10 years ago
WS64 085b4fce6a Handle defaults by type (boolean/string/number) 10 years ago
pazos 850eea418e translate filemanager (search & setdefaults) 10 years ago
WS64 6c911bb453 remember editor settings after changing/cancelling one entry 10 years ago
WS64 a51f8e8050 Update filemanagersetdefaults.lua 10 years ago
WS64 bd596927dd Corrected the filename 10 years ago