2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

1404 Commits

Author SHA1 Message Date
zwim
9b9cfe29a4
[feat] Replace TimeVal (RIP) with time, fixed point time seconds (#8999) 2022-05-05 21:00:22 +02:00
NiLuJe
86c35ad066
A host of low power states related tweaks (#9036)
* Disable all non power management related input during suspend. (This prevents wonky touch events from being tripped when closing a sleep cover on an already-in-suspend device, among other things).
* Kobo: Use our WakeupMgr instance, not the class.
* WakupMgr: split `removeTask` in two: 
* `removeTask`, which *only* takes a queue index as input, and only removes a single task. Greatly simplifies the function (i.e., it's just a `table.remove`).
* `removeTasks`, which takes an epoch or a cb ref, and removes *every* task that matches.
* Both of these will also *always* re-schedule the next task (if any) on exit, since we can have multiple WakeupMgr tasks queued, but we can only have a single RTC wake alarm set ;).
* `wakeupAction` now takes a `proximity` argument, which it passes on to its `validateWakeupAlarmByProximity` call, allowing call sites to avoir having to duplicate that call themselves when they want to use a custom proximity window.
* `wakeupAction` now re-schedules the next task (if any) on exit.
* Simplify `Kobo:checkUnexpectedWakeup`, by removing the duplicate `WakerupMgr:validateWakeupAlarmByProximity` call, now that we can pass a proximity window to `WakeuoMgr:wakeupAction`.
* The various network activity timeouts are now halved when autostandby is enabled.
* Autostandby: get rid of the dummy deadline_guard task, as it's no longer necessary since #9009.
* UIManager: The previous change allows us to simplify `getNextTaskTimes` into a simpler `getNextTaskTime` variant, getting rid of a table & a loop.
* ReaderFooter & ReaderHeader: Make sure we only perform a single refresh when exiting standby.
* Kobo: Rewrite sysfs writes to use ANSI C via FFI instead of stdio via Lua, as it obscured some common error cases (e.g., EBUSY on /sys/power/state).
* Kobo: Simplify `suspend`, now that we have sane error handling in sysfs writes.
* Kobo.powerd: Change `isCharging` & `isAuxCharging` behavior to match the behavior of the NTX ioctl (i.e., Charging == Plugged-in). This has the added benefit of making the AutoSuspend checks behave sensibly in the "fully-charged but still plugged in" scenario (because being plugged in is enough to break PM on `!canPowerSaveWhileCharging` devices).
* AutoSuspend: Disable our `AllowStandby` handler when auto standby is disabled, so as to not interfere with other modules using `UIManager:allowStandby` (fix #9038).
* PowerD: Allow platforms to implement `isCharged`, indicating that the battery is full while still plugged in to a power source (battery icon becomes a power plug icon).
* Kobo.powerd: Implement `isCharged`, and kill charging LEDs once battery is full.
* Kindle.powerd: Implement `isCharged` on post-Wario devices. (`isCharging` is still true in that state, as it ought to).
2022-05-01 23:41:08 +02:00
hius07
428edf90bd textviewer: add close_callback 2022-04-17 09:37:29 +02:00
Tesseract Cat
e38a82453a
ImageViewer: allow browsing images list with keys (#8927) 2022-04-14 09:28:07 +02:00
Philip Chan
77accf6546
Non-touch: highlight movement improvement and enable page crop (#8947) 2022-04-14 08:59:36 +02:00
poire-z
658991ed5e SpinWidgets: keep movable position/alpha after Apply
Since eda8379e8c, on Apply, the widget is fully rebuild,
and was repositionned at its initial position (centered)
and fully opaque.
2022-04-11 22:42:56 +02:00
NiLuJe
930fa9ac1f Make sure InputText has a consistent API, regardless of hasDPad
Fix #8967
Regression since #8859
2022-04-05 02:07:53 +02:00
NiLuJe
2aa310a931
ScreenSaver: Minor refactor to avoid code duplication and weird rotation shenanigans (#8943)
* Handle said rotation shenanigans inside ScreenSaver & ScreenSaverWidget, which allows a more targeted approach; and prevents said rotation from affecting other widgets. (Also, gets rid of duplicated code).
* Handle the corner-case or exiting early from a "keep on screen for n sec" screensaver better, by unscheduling the extra refresh, since an early tap took care of that already.
2022-04-02 18:21:40 +02:00
NiLuJe
23bce343bb
ButtonProgressWidget: Make hold_callback optional (#8940)
We don't need one in FrontLightWidget ;).

Fix https://github.com/koreader/koreader/issues/8913#issuecomment-1074915143
2022-03-22 20:38:23 +01:00
NiLuJe
d761b62076
FrontLightWidget: Unbreak warmth on full-granularity devices (#8935)
Fix #8913
Regression since #8856

Change tacks, to allow full granularity with the +/- buttons.
2022-03-22 09:58:29 +01:00
Utsob Roy
357bc65217
Keyboard: add Bengali Probhat layout (#8887)
Add keyboard with Bengali Probhat layout.
Bump koreader-fonts for added Noto Sans Bengali UI,
and include it among our fallback fonts.
2022-03-15 23:13:13 +01:00
NiLuJe
217a73f3c0
Initial Kindle PW5 support (#8856)
* Rejig frontlight warmth API to more closely match the existing API, and, hopefully, clarify some of its quirks, and reduce boilerplate and duplicate code in platform implementations.
* Tweak Kindle:setDateTime to prefer using the platform's custom script, as in interacts better with the stock UI. And make the fallbacks handle old busybox versions better.
* Add Kindle PW5 support ;).
* Add warmth support to the Kindle platform.
* Random TextBoxWidget cleanups: make sure we immediately free destroyed instances.
* FrontLightWidget: Refactor to make it slightly less obnoxious to grok and update; i.e., separate layout from update, and properly separate brightness from warmth handling. Move to simpler widgets instead of reinventing the wheel.
* TextBoxWidgets: Implement `setText` to match TextWidget's API, as some callers may be using the two interchangeably (i.e., Button).
* NaturalLightWidget: Make sure we pass a string to InputText
* InputText: Add debug guards to catch bad callers not passing strings ;).
2022-03-14 19:56:18 +01:00
Philip Chan
4f849c23ab
Non-touch: highlight support (#8877)
readerhighlight: non-touch support
focusmanager: fix same type container share same selected field
radiobuttonwidget: non touch support
sortwidget: non touch support
openwithdialog: fix layout contains textinput, checkboxes added to layout twice
2022-03-12 12:16:50 +01:00
hius07
a6d6ba3606
Menu widget: fix no items (#8838)
Avoid showing "Page 0 of 0" in non-classic dispaly modes.
2022-03-12 11:30:26 +01:00
poire-z
831488b9e9
Bidi: keep invert() generic, handle settings in ReaderView (#8876)
Follow up to 42dd5aad. Handle settings only in
ReaderView:shouldInvertBiDiLayoutMirroring().
2022-03-08 21:27:11 +01:00
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
2022-03-04 21:20:00 +01:00
yparitcher
59a63c11b1
RadioButtonTable: CheckButton does not have onFocus (#8847)
Fixes #8841
2022-02-27 09:02:47 +01:00
hius07
ee593e6b17 naturallightwidget: revert movable 2022-02-22 16:30:22 +01:00
hius07
ed4290089b frontlightwidget: revert movable 2022-02-22 16:30:22 +01:00
yparitcher
73bb76f92d menu: separate indentation from text 2022-02-20 16:09:39 +01:00
yparitcher
60f68023d8 BD invert: enable for TOC BookMap & PageBrowser 2022-02-20 16:09:39 +01:00
yparitcher
62c6c757cc _mirroredUI do not set at require time 2022-02-20 16:09:39 +01:00
hius07
8bb08b503a
Cloud storage: enhance download dialog, fix Dropbox uploading (#8809)
(1) ButtonDialogTitle: new method setTitle()

(2) OPDSbrowser
-use setTitle() instead of open/close ButtonDialogTitle (no visual changes to the download dialog)
-reduce logger.info output to avoid flooding crash.log

(3) CloudStorage
-enhance download dialog (similar to OPDS), much optimized code of downloadFile
-fix a bug: cannot create new folder or upload files to the root of the Dropbox storage
2022-02-17 10:53:15 +01:00
hius07
c7666221ec Pathchooser: add folder shortcuts 2022-02-07 22:08:26 +01:00
hius07
b02ffa7c10 RadioButtonTable: RadioButton replaced with CheckButton with RadioMark 2022-02-07 22:02:54 +01:00
hius07
e7b3952fa2 CheckButton: insert RadioMark 2022-02-07 22:02:54 +01:00
hius07
aaa3a980f3 NaturalLightWidget: insert TitleBar, movable 2022-02-07 22:01:22 +01:00
hius07
fe19ca2478 FrontLightWidget: insert TitleBar, movable 2022-02-07 22:01:22 +01:00
poire-z
5e224d541f
PageBrowser: allow changing nb of chapter levels shown (#8772)
Instead of using the depth configured in Book map, start
with max depth, and allow decreasing (and reseting when
at 0) with long-press on the (i) top left icon.
2022-02-05 01:46:24 +01:00
hius07
12344261f0
RadioMark: down shift (#8771) 2022-02-04 06:08:07 +02:00
hius07
cb7e670c4a
MultiInputDialog: do not refresh full screen on show (#8760)
Fix ugly full screen flashing on show.
2022-02-02 20:31:24 +01:00
hius07
99edc53919 BookStatusWidget: insert TitleBar 2022-02-02 17:05:28 +01:00
NiLuJe
0408816a54 ReaderFooter: Take the PowerCover into account in the battery level
widget

Since we only use a single icon, we have to take a few shortcuts:

* The icon itself is computed based on the average of both batteries.
* The actual value is the sum of both batteries.
* Much like everywhere else, charging means the *aux* battery charging
  (i.e., connected to a power source).

Re #8741, which does the same for ReaderHeader.
2022-02-02 00:37:05 +01:00
hius07
c1c89dd611
TouchMenu: use radio buttons for single choice menu items (#8757) 2022-02-01 20:56:28 +01:00
poire-z
f764a61b69 KeyValuePage: allow for more fancy callbacks
Add support for hold_callback.
Provides kv_page and kv_item to callbacks.
Allow for item removal and refresh.
2022-01-31 23:57:48 +01:00
hius07
1c863f76aa
Bookmarks: start Add note with empty text, add some buttons (#8738)
- New button Go to bookmark in Bookmark details dialog.
- New button Latest bookmark in the popup menu.
- Empty input box for new note, new button Paste to
  paste highlighted text (auto-text).
- Allow duplicated bookmarks to avoid orphaned highlights.
- TextBoxWidget: fix enabled up-arrow on empty box in InputDialog.
2022-01-28 22:59:25 +01:00
Philip Chan
978aa2006a
FocusManager:focusTopLeftWidget(): only if hasDPad (#8737)
Focusing (highlighting/inverting) widgets should not
happen on touch devices withoud DPad.
2022-01-28 22:55:26 +01:00
zwim
f2557a7aa6
Terminal emulator: full rewrite, real vt52 emulator (#8636)
New real terminal emulator, replacing the old plugin.
The emulator is basically a vt52 terminal (enriched with
some ANSI-sequences, as ash, vi and mksh don't behave well
on a vt52 term).
So far working: ash, mksh, bash, nano, vi, busybox, watch...
The input supports: tab-completion; cursor movement;
backspace; start of line, end of line (long press);
page up, page down (long press).
User scripts may be placed in the koterm.koplugin/scripts/
folder, aliases can be put in the file aliases and startup
command in the file profile.user in that folder.
2022-01-28 20:33:09 +01:00
poire-z
eb5e0f9be2 BookMap: long-press on (i) to switch current/initial views 2022-01-25 21:33:19 +01:00
poire-z
95b35ec669 Allow any multiswipe to close some fullscreen widgets
For consistency with BookMap and PageBrowser widgets
where swipe south (the usual gesture to quick close)
can't be used for closing and we had to use any
multiswipe instead, allow any multiswipe to close
these other fullscreen widgets too:
Menu (ToC, Bookmarks), KeyValuePage, ImageViewer,
BookStatusWidget, ReaderProgress, CalendarView.
2022-01-25 21:33:19 +01:00
Philip Chan
3af268dd7a
Non-Touch: improve bottom menu usability (#8712)
- FocusManager: allow managing sub widgets by merging their
  "layout" in the main one; make "press" support simpler by
  handling it as a fake tap event at the center of the
  focused widget.
- Setup gestures on non-touch devices for new focus manager.
- ToggleSwitch: use child layout.
- ButtonProgressWidget: use child layout.
- SpinWidget and DoubleSpinWidget: add keyboard navigation.
2022-01-25 01:32:46 +01:00
hius07
2e49b780bd InputText clipboard: disable Paste if empty 2022-01-24 22:27:45 +01:00
hius07
0cdbe91e2a KeyboardLayoutDialog: insert TitleBar 2022-01-24 22:27:45 +01:00
hius07
a3e901dcd3 OpenWithDialog: movable, addWidget 2022-01-24 22:27:45 +01:00
poire-z
16e3b2f0ac Allow Backspace to work as back button 2022-01-24 08:50:47 +01:00
John Beard
ccc49036aa Handle arrow keys and enter in emulator text fields 2022-01-24 08:50:47 +01:00
comphilip
f468f873bd
Support non-touch device to choose file or folder (#8696)
## Background
`pathchooser.lua` does not support non-touch device to choose file or folder due to those device cannot generate long press event.

## Choose File
Non-touch device can select file in list, it is good enough to choose file without long press to confirm.

## Choose Folder
`pathchooser.lua` changes the label of current directory `.` to `Long-press to choose a folder`. It is user friendly, while for non-device, it is a very good place to let user tell the system I want the current folder to be chosen without extra long press.
2022-01-21 18:28:04 +01:00
hius07
7783d9c8e3
InputDialog: insert TitleBar (#8695)
into InputDialog, MultiInputDialog, OpenWithDialog, LoginDialog widgets.
2022-01-20 12:36:35 +02:00
NiLuJe
dc98384177 PowerD: Add a framework to report the status of auxiliary batteries
Implement it on the Kobo Sage, for the PowerCover

TouchMenu: Display auxiliary battery status

Kobo: More accurately report the PowerCover's charging status

i.e., try to actually figure out if the auxiliary battery is charging
instead of just checking the reader's battery (because that one will
often swap between the charging and discharging state as it drains the
aux battery...).

PowerD: Use a cached timestamp when doing battery pull checks
2022-01-19 12:44:35 +01:00
poire-z
0216493c43 Wikipedia: rework wiki languages internal handling
Fix various issues with stacked Wikipedia lookup results,
and follow up lookups when invoked from Wikipedia lookup
history (where going to a search for language LL would
not use language LL when hitting "Full wikipedia").
2022-01-19 12:23:38 +01:00
poire-z
dccd0da4cc Fix hold duration in text/html box widgets
Fix very-long-press in DictQuickLookup that should allow
doing the query to the other domain (dict/wiki) instead
of the current one.
Similar to 7dea979.
2022-01-19 12:23:38 +01:00
hius07
ca6d82e668
More widgets: insert TitleBar (#8683)
SpinWidget, DoubleSpinWidget, DateTimeWidget, RadioButtonWidget got new TitleBar.
2022-01-19 13:02:13 +02:00
hius07
958077364a
Filemanager: insert TitleBar (#8648) 2022-01-12 19:41:52 +02:00
hius07
5c39c19a73
[chore] Remove leftover: cface (#8659)
Ancient menu widget had it.

Not used anymore.
2022-01-12 13:32:03 +01:00
hius07
1bfb49c6a5
PathChooser: add left Home button (#8646) 2022-01-11 14:47:06 +02:00
hius07
55532b1397
Menu widget: insert TitileBar (#8639) 2022-01-10 21:21:39 +02:00
poire-z
6fd4805bd1 ImageViewer: update to TitleBar widget
Rewrite widget layout building and update logic.
2022-01-10 19:59:11 +01:00
poire-z
2d7d6fe088 TitleBar: new options for subtitle and icon rotation 2022-01-10 19:59:11 +01:00
poire-z
a6b09c2981 BookMap, PageBrowser: make help_text translatable
Minor wording update.
Add a larger and thicker info.svg for their top left icon.
2022-01-10 19:59:11 +01:00
poire-z
ad0454dcdf KeyValuePage, Sortwidget: fix RTL mirrored layout 2022-01-10 19:59:11 +01:00
hius07
9f6355e0ed
SortWidget: insert TitleBar (#8627) 2022-01-08 18:45:54 +02:00
hius07
1bd7b4f088
TextViewer: insert TitleBar (#8625) 2022-01-08 18:45:18 +02:00
poire-z
a1cbc3bb9e KeyValuePage: update to TitleBar widget 2022-01-08 17:43:35 +01:00
poire-z
48ca7e820c DictQuickLookup: update to TitleBar widget
Also tweak ReaderHighlight:onHoldRelease() to avoid
doing its stuff when onHold() is clearing highlight
(previous CheckButton was closing/clearing on hold
release, new TitleBar close button does that on hold).
2022-01-08 17:43:35 +01:00
poire-z
4546d826ee TitleBar: new options, dedicated close button
- Fix hold callback name
- Add options to handle long titles (truncated by default):
  "title_multines" and "title_shrink_font_to_fit" (allowing
  setTitle() with them makes the code a bit more complex).
- Add options to set bottom line color and horizontal padding.
- Use an added close.svg (based on exit.svg, tweaked to have
  similar size and baseline as other icons) for close button.

IconButton:
- handle hold/hold_release similar to Button.
- new option allow_flash to allow disabling flashing.
2022-01-08 17:43:35 +01:00
poire-z
bc16b32395 Add Book map and Page browser features
- Book map: shows a map of content, including TOC,
  boomarks, read pages, non-linear flows...
- Page browser: shows thumbnails of pages.

- ReaderThumbnail: new Reader module that provides
  a service for generating thumbnails of book pages.
  It makes available these 2 new fullscreen widgets.
- ReaderBookmark, ReaderLink, Statistics: add methods
  to return new views of bookmarks, previous locations
  and read pages, that are needed by BookMapWidget.
- ReaderToc: compute TOC max_depth.
- ReaderBookmark, ReaderHighlight: send events on
  bookmark add/update/remove so thumbnails of the
  pages impacted can be trashed.
2022-01-04 21:59:37 +01:00
poire-z
2530e954a2 Add TitleBar widget
Existing widgets building their own title bar with help
of CloseButton should progressively be updated to use
this, for clarity, consistency, and less code duplication.
2022-01-04 21:59:37 +01:00
hius07
9bb096484a
FileChooser: show nb of files and subdirs in folders (#8598)
On folders, instead of "5 items", show "2 dirs 3 files"
separately (using symbols for "dirs" and "files").
Also fix: if files filtering is enabled, PathChooser did
show the full number of files in subfolders, instead
of the number of filtered files.
2022-01-04 21:34:22 +01:00
zwim
6c9e222d33
Screensaver: allow limiting stretch of covers and images (#8570)
ImageWidget: adds stretch_limit_percentage parameter.
Add support for screensaver on the emulator, for easier testing.
2022-01-02 23:13:19 +01:00
hius07
da7ef64773
Menu widget: title bar resize (#8603) 2022-01-02 20:12:52 +02:00
Frans de Jonge
1622822931
[chore, CI] Remove unused logger require (#8588) 2021-12-25 23:11:25 +01:00
hius07
20e9f3e80a
textviewer: fix refresh (#8576)
When TextViewer is showing up, it causes screen refresh of the rectangle from the upper left corner of the screen (0,0) till the lower right corner of the TextViewer window (the result of `combine`).
So when the TextViewer is not full-screen, left and upper parts of the screen are refreshed.
This unpleasent screen flashing can be seen, for exampe, when showing book description from the Book information page, or when calling the clipboard (long-press on the text input box).
Let's show the TextViewer in a usual way, as (almost) all other widgets do.
2021-12-25 22:56:24 +01:00
hius07
a9229ec3aa
Menu widget: add extra (left) title button (#8564)
Customizable icon and actions on tap and long-press.
2021-12-24 13:21:12 +02:00
hius07
f83eee02dd
[fix] filechooser: disable long-press in select mode (#8567) 2021-12-21 12:04:20 +01:00
Scarlett
8f1d219154
TextBoxWidget: add option to set bgcolor (#8559) 2021-12-17 00:49:53 +01:00
hius07
1df6ab751b
ButtonDialogTitle: no bold font in the title by default (#8557) 2021-12-16 14:46:53 +02:00
hius07
d4eecd9f00
SpinWidget in Dispatcher fix (#8558)
Enable SpinWidget OK button in dispatcher for unchanged value.
2021-12-16 13:55:05 +02:00
hius07
a703b213f7
File manager: group operations (#8536)
Copy/Move/Delete for group of files.
"Select files" button in the filemanager Plus menu.
2021-12-16 13:12:25 +02:00
poire-z
5ed22cafb5
TextBoxWidget: fix crash in legacy mode (#8545)
Just do as in _measureWithXText(): convert to
string when text is not (ie. a number).
2021-12-10 15:28:22 +01:00
hius07
4be2c81582
SpinWidget fix enable/disable OK button (#8529)
Regression since #8495. SpinWidget with value_table didn't work.
2021-12-07 22:10:52 +02:00
hius07
19271c08c4
Checkbutton widget optimization (#8522)
-checkmark toggling is separated from the callback
-default width added
2021-12-07 13:35:44 +02:00
Frans de Jonge
d9730cf0fc
[chore, CI] Remove empty whitespace (#8506) 2021-12-03 07:48:40 +01:00
hius07
eda8379e8c
SpinWidget, DoubleSpinWidget: enable/disable OK button (#8495)
OK/Apply button is enabled only after changing the input value.
2021-12-01 19:58:48 +02:00
hius07
791bb380ab
ConfigDialog: fix set as default (#8498)
Fix "Set as default" action with SpinWidget and DoubleSpinWidget.
Correct name of the setting to be saved as default.
2021-12-01 17:41:30 +02:00
hius07
ad09411c3f
DoubleSpinWidget buttons move (#8490)
Move Default and extra buttons above Cancel/OK.
Default values shown in the default button.
Precisions can be set for both values separately.
Minor geometry fix for consistence with SpinWidget.
2021-12-01 12:42:54 +01:00
zwim
ef4d88ccd6
Battery stats plugin: tidy up, single page (#8491)
KeyValuePage: add a 'single_page' option to force
showing all items on a single page.
2021-12-01 12:39:48 +01:00
zwim
6a01abb52c
[doc] add documentation to a few widgets (#8425) 2021-12-01 12:37:18 +01:00
Dylan Garrett
7495ea29ef
InputDialog: add 'use_available_height' option (#8467)
Use it with bookmark edit, to allow entering longer notes.
2021-11-28 23:30:15 +01:00
zwim
b029a6a1ff
[autosuspend, plugin] Switch to datetimewidget and provide default values (#8480) 2021-11-28 22:18:44 +01:00
hius07
372dd9e36b
SpinWidget buttons move (#8485)
SpinWidget "Default value" and extra buttons move up.
Cancel/OK buttons row is in the bottom now.
Default value is shown in the Default button.
2021-11-27 19:10:54 +02:00
zwim
e9ba854ff0
DeviceMenu: Colons and more information (#8435)
Add information to device menu entries
2021-11-23 21:17:07 +01:00
roygbyte
e995cf1355
Fix typo in ListView doc (#8444) 2021-11-15 09:02:00 +01:00
zwim
abcd989ec4
[Status bar] Add custom text to footer (#8419)
Allows to add any text to the status bar. Can be a placeholder (empty space) for better positioning of the indicators.
2021-11-09 19:04:44 +02:00
Aleksa Sarai
fb0e5fca94 menu: keyboard_layout: add ability for layout-specific settings
A layout might want to make some specific feature configurable, so
create an addToMainMenu-like system for allowing layouts to add their
own configuration sub-menu to the keyboard configuration menu.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-07 19:23:56 +01:00
Aleksa Sarai
cb702fb062 inputtext: add access methods for internal character list
This allows for InputText wrappers (namely the Japanese keyboard which
needs to be able to apply modifiers to the character before the cursor)
to nicely access the character list.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-07 19:23:56 +01:00
NiLuJe
4d261d29a4 ProgressWidget: Better contrast in thin mode
Re #8400

Also, use the proper colors when switching between thick & thin.
2021-11-01 23:38:22 +01:00
hius07
bfddf710d6
InputDialog: fix "number" input (#8383) 2021-10-29 14:03:57 +03:00
zwim
a7cfc65928
Fix crash when entering a digit on the SDL keyboard (#8388)
Fixes #8387.
2021-10-29 12:59:03 +02:00
Aleksa Sarai
7a0e3d5e68 readerhighlight: remove selected_word and use selected_text everywhere
There were two ways of specifing selected text for a highlight depending
on whether it was a "single word" or text selected using hold-and-pan.
In addition to being a bit more complicated than is necessary, with the
addition of the language support plugin system (where the "single word"
selected might be expanded), it makes more sense to simply use the same
logic and table structure for both cases.

The dictionary lookup special case (hold-without-pan triggering a
dictionary lookup by default) still works as before.

In addition, this patch fixes a minor inefficiency during dictionary
quick lookup -- before this patch, the highlight would be re-selected
because the quick lookup window is run concurrently and tries to fetch
ReaderHighlight.selected_text but this is set to nil immediately after
triggering the lookup. This is unnecessary because :clear() will be
called anyway when the quick pop-up closes, and so clearing this can be
left until then.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-10-23 15:49:54 +02:00
NiLuJe
942ea70235 ProgressWidget: Simplify painting logic.
* Use paintRect and plain colors instead of lightenRect and a weird
  dimming factor.
* Update call sites to the new API
* Handle FP maths properly (i.e., floor coordinates & ceil dimensions at
  the latest possible time).
* Fix border handling in the fill bar (make sure we actually honor it
  when computin the x position, and that we won't overflow into it when
  computing the width).
* Update docs
2021-10-22 20:24:46 +02:00
hius07
22a012e729
[chore] RadioButtonWidget: remove unused "Use default" string (#8354) 2021-10-22 10:27:30 +02:00
hius07
d652eec2cd
ReaderHighlight: allow updating a highlight drawing style (#8323)
Also modify highlight dialog's "Edit" button to be "Add note"
or "Edit note" whether a note has already beed added.
Adds a new RadioButtonWidget.
2021-10-18 19:17:37 +02:00
hius07
7036500f5b
Menu widget: adapt font size of shrunken items (#8340) 2021-10-18 08:52:40 +02:00
poire-z
ca1c3484d8
DictQuickLookup: two minor fixes (#8333)
- Allow Wikipedia languages cycling when invoked
  from File browser.
- Fix TextBoxWidget content not updated when next/prev
  when use_xtext=false.
2021-10-15 20:32:21 +02:00
yparitcher
1c2e5eee1d
BookStatusWidget: fix status toggle (#8329)
Fix:  #8324

cf: #7671
2021-10-15 09:22:26 +02:00
poire-z
ade89cb9b6
Adds ScrollableContainer, to be used with tall widgets (#8299)
And use it with KeyboardLayoutDialog.
2021-10-10 15:09:42 +02:00
hius07
b2a7d0d5ce
BookStatusWidget: use correct read percentage (#8318)
Closes #8317.
2021-10-10 11:55:32 +02:00
NiLuJe
75706ca0be
TextBoxWidget: Unbreak Wikipedia (bis) (#8298)
re: https://github.com/koreader/koreader/pull/8275#issuecomment-933744596
2021-10-05 15:40:51 +02:00
hius07
3fe09ecc01
CenterContainer: options to handle larger content (#8277) 2021-10-01 20:33:39 +02:00
hius07
4c9d1ac3f8
Spinwidgets: can now get width or width_factor (#8269) 2021-10-01 20:32:16 +02:00
hius07
2b87b1d8ed
Virtualkeyboard: allow grey'ing the legacy umlaut mode key (#8276)
This key is still available on non-updated keyboard layouts.
2021-09-28 14:08:40 +02:00
NiLuJe
0ea8bee4e1
TextBoxWidget: Unbreak Wikipedia (#8275)
Turns out we can't release line_num_to_image early, so, delay it until the final, full widget teardown.

(Regression since #8250, c.f., https://github.com/koreader/koreader/pull/8250#discussion_r716646211)
2021-09-28 01:37:13 +02:00
zwim
0c7d174cd7
[frontlight, kobo, cervantes] Remove auto_warmth (#8154)
The feature is now provided by the "Auto warmth
and night mode" plugin (#8129).
2021-09-25 23:24:34 +02:00
zwim
9ed22df03f
DateTimeWidget: replaces DateWidget and TimeWidget (#8240)
Deduplicate code by combining DateWidget and TimeWidget.
ReadTimer plugin: some rewording.
2021-09-25 19:59:45 +02:00
zwim
20f7d14495
Plugin: Auto warmth and night mode (#8129)
("Auto nightmode" only on devices without warmth.)
2021-09-25 11:02:10 +02:00
hius07
e3cf8eea56
Many widgets: similar size in portrait and landscape (#8238)
- ButtonTable, ButtonDialog, ButtonDialogTitle
- ConfirmBox, MultiConfirmBox, SkimToWidget
- KeyboardLayoutDialog (and initially move the dialog
  down to show the title in landscape mode)
- InputText's Clipboard dialog
Also: Notification: truncate long text
2021-09-25 10:51:58 +02:00
hius07
1e47cd7e5f
SpinWidget: similar size in portrait and landscape (#8226) 2021-09-25 10:40:04 +02:00
hius07
3e313be22b
Screenshoter: allow reset default folder from menu (#8227) 2021-09-25 10:21:18 +02:00
hius07
02170ee9b6
Progresswidget: lighter background color (#8195)
Should make ticks more visible.
2021-09-25 10:17:05 +02:00
NiLuJe
65abac9431 TextBoxWidget: Fix getSize when recycling an instance.
* Make sure we have a BB to measure in getSize, in case the instance is
  recycled. (fix #8241)

* nil `line_num_to_image` early in `:free`

* Hide the _renderText calls that are used across the whole module to
  simply update the text layout & instantiate the inner bb behind a
  wrapper function with a slightly less obscure name.
2021-09-25 02:47:06 +02:00
hius07
859327dea5
Input dialogs: keep size in rotation (#8223) 2021-09-17 19:36:57 +02:00
hius07
5c62c11aa8 TimeWidget: keep "colon space" size 2021-09-13 19:32:19 +02:00
hius07
28c132a740 DateWidget: keep "dash space" size 2021-09-13 19:32:19 +02:00
hius07
11aca120a9 ConfigDialog: keep size in rotation 2021-09-13 19:32:19 +02:00
hius07
bdccc7de07 DateWidget: keep size in rotation 2021-09-13 19:32:19 +02:00
hius07
a321bade2b TimeWidget: keep size in rotation 2021-09-13 19:32:19 +02:00
hius07
611e576b7e DoubleSpinWidget: keep size in rotation 2021-09-13 19:32:19 +02:00
hius07
66156084e6 NumberPickerWidget: keep size in rotation 2021-09-13 19:32:19 +02:00
Mel-kior
9e55e4da3d Fix syntax 2021-09-11 10:55:50 +02:00
Mel-kior
3001efb85f Fix quote and text 2021-09-11 10:55:50 +02:00
Mel-kior
224e167309 Add passwordless wifi support 2021-09-11 10:55:50 +02:00
hius07
07c8b0029e Buttontable: pass icon size to the button 2021-09-11 10:48:09 +02:00
hius07
3b6fd8a1d5 Button: default icon size 2021-09-11 10:48:09 +02:00
hius07
e16d36d5da
Readersearch: add button to recall search input dialog (#8190) 2021-09-10 01:07:31 +02:00
hius07
3a677f40de
Spinwidget: update default width (#8182) 2021-09-06 21:26:57 +02:00
hius07
1a127633c2
InputDialog: add :addWidget(), use it for checkboxes (#8168)
Also: Text editor now closes its keyboard when calling Find
and Go to line (which open their own keyboards) to avoid
conflicts between multiple keyboards.
2021-09-02 22:53:54 +02:00
hius07
85cfb552cb
Keyboard preferred layouts: usability fixes (#8159)
Store list of layouts in settings file as array of enabled
layouts only (up to 4 elements). Optimize code.
Allows sorting of the abbreviations in the globe popup:
just check layouts in the desired order (the first checked
will be northeast).
Requires onetime migration to clean up the settings.
2021-09-01 22:55:59 +02:00
yparitcher
36fd668093 ConfigDialog: remove uneeded support for muliple events
Fixes reflow support for dispatcher
2021-09-01 10:30:46 -04:00
NiLuJe
426e56613c
FrontLightWidget: Fix "Auto" max_width (#8144)
re: https://github.com/koreader/koreader/issues/8070#issuecomment-902162990
2021-08-29 17:08:46 +02:00
NiLuJe
910c0bd250
VirtualKeyBoard: Switch to schedule-less visual feedback for flash_keyboard (#8143)
Should prevent open/close races ;).
2021-08-29 17:04:24 +02:00
hius07
32d61c7878
Virtual keyboard: default layout, compact mode (#8142) 2021-08-29 12:29:41 +02:00
hius07
68782c3f89
Checkbutton: optimize callback (#8134) 2021-08-27 21:21:14 +02:00
mergen3107
fdae07e2cc
VirtualKeyboard: redesign and enhancements (#8089)
See #8089 for all the details.
2021-08-24 23:51:39 +02:00
hius07
684fd6c12d
Standardize select/choose to choose (#8128)
Closes #8105.
2021-08-24 22:19:07 +02:00
hius07
3c3361addf
File browser, Path chooser: fix margin of the long folder name in the header (#8103)
* Filemanager: margin of the folder name in the header

* Menu: margin of the folder name in the header
2021-08-22 09:35:22 +02:00
hius07
66b644295a
Checkbutton: remove unused (#8108)
* Inputtext checkbutton: add "parent"
2021-08-22 09:10:35 +02:00
NiLuJe
c044480658 Don't exclude the full .kobo directory tree
Only exclude the useless/dangerous bits.
Allows getting to the Dropbox folder.

Fix #8101
2021-08-19 22:40:04 +02:00
poire-z
55a4d6fd1f Button: avoid cut words when switching to multilines
Followup to 954ba960
2021-08-17 21:44:48 +02:00
poire-z
6e02e62dcb Dict: avoid list items bullet/digit truncation with HTML dicts 2021-08-17 21:44:48 +02:00
hius07
b875ccc6f9
InputText: fix hold handling, add clipboard empty hint (#8091)
Before: when holding the input box in input dialogs
for calling the Clipboard, hold release was passed to
MovableContainer and input dialog moved a little bit.
2021-08-17 15:24:44 +02:00