Commit Graph

2747 Commits (3427c207b0dc8eca0ace1dc25633dd6a76e910ab)

Author SHA1 Message Date
zwim e9ba854ff0
DeviceMenu: Colons and more information (#8435)
Add information to device menu entries
3 years ago
hius07 3a7cba38c2
Customize page turns tap zones (#8475)
Settings for page turn tap zones position (vertical or horizontal) and width.
3 years ago
yparitcher 5dbeddd2a1
Wifi: toggle when connected even if offline (#8468) 3 years ago
Frans de Jonge dcd34d409e
[chore] Change "filebrowser" to "file browser" (#8466) 3 years ago
poire-z 6f2fdd96f8
[chore] Fix a few luacheck errors (#8461) 3 years ago
zwim 8ef426d79f
ReaderMenu/FileManagerMenu: deduplicate Exit menu code (#8459) 3 years ago
zwim 1d92ee19fb
Navigation menu: cleanup, use colons in menu (#8442) 3 years ago
hius07 217937a5bc
ReaderPaging/Rolling: deduplicate inverse_reading_order code (#8445) 3 years ago
roygbyte e995cf1355
Fix typo in ListView doc (#8444) 3 years ago
Aleksa Sarai 7e611ac50c
keyboard: japanese: always put digits as the south gesture for latin (#8443)
This is to match GBoard's layout for the latin keyboard mode.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
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.
3 years ago
hius07 3dabbd5d73
Typeset menu: adds "Reset document settings to default" (#8412) 3 years ago
Aleksa Sarai cdae66a661 keyboard: japanese: switch to 12-key flick layout
This layout is far more commonly used on mobile devices, and allows for
much easier typing. The keyboard primarily functions through gestures in
the four cardinal directions to select which vowel kana to select. In
addition, users can cycle through each kana row by tapping the key
within a 2-second window (this is the equivalent to T9 input for
Japanese phone keyboards).

This also resolves the long-standing issue that the old keyboard did not
correctly handle dakuten (there was a standalone dakuten key which added
a stray dakuten mark, and the umlat mode which added dakuten to all of
the keys it could) and could not input handakuten characters at all.

In order to allow adding dakuten and cycling through the various
modifiers for the previous kana, we need to wrap the input-box (similar
to korean) but luckily we don't need any state machine magic since we
just need to modify the last character in the character buffer. However
because the tap timeout for T9-like-cycling needs to be reset after any
non-tap key we need to add some basic wrappers around a few other
input-box methods.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
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>
3 years ago
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>
3 years ago
Aleksa Sarai 7baeebc2d4
dictionaries: switch to far more up-to-date JM(ne)dict (#8413)
The previous version of JMdict comes from 2009 and doesn't appear to
work at all when trying to do basic lookups (likely due to some kind of
encoding problem). In addition, the license information and sourcing was
not really in line with the requirements specified by the JMdict
license. This version is far more up-to-date and also includes synonym-based
deinflection (though because KOReader has a Japanese plugin now, this is
technically not necessary).

Since there didn't exist a nicely-maintained place to download these
dictionaries (because StarDict is not widely used for Japanese
dictionaries), I've set up a personal GitHub repository where I've
hosted them. Note that we're intentionally not pinning the commit hash
because GitHub only recommends we use gh-pages for CDN purposes, and one
of the requirements of the JMdict license is that you need to be able to
update to later versions.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
NiLuJe 4d261d29a4 ProgressWidget: Better contrast in thin mode
Re #8400

Also, use the proper colors when switching between thick & thin.
3 years ago
NiLuJe bc5da5276d NetworkManager: Always prefer system APs as intended.
If we had a local prefered AP with a higher RSSI,
we attempted to associate with it over wpa_supplicant
being already attempting to associate with its own preferred AP.
That... failed horribly.

Also adapt to the new lj-wpaclient API, fixing a few other edge-cases,
and making the whole thing slightly faster because we no longer
uselessly sleep.
And more reliable because we now actually wait for replies to our
requests.

Bump base

https://github.com/koreader/koreader-base/pull/1424
3 years ago
hius07 bfddf710d6
InputDialog: fix "number" input (#8383) 3 years ago
zwim a7cfc65928
Fix crash when entering a digit on the SDL keyboard (#8388)
Fixes #8387.
3 years ago
Aleksa Sarai 7c5243667b reader: implement language-support plugin system
This creates a new plugin system which hooks into a handful of reader
operations in order to allow plugins to add language-specific support
where the default reader falls short. The two hooks added are:

 * During hold-without-pan taps, language plugins can modify the
   selection in order to better match what users expect koreader to
   highlight when selecting a single word.

   The vast majority of CJK language words are more than one character,
   but KOReader treats all CJK characters as a single word by default,
   so adding this hook means that readers no longer need to manually
   select the whole word every time they need to look something.

 * During dictionary lookup, language plugins can propose alternative
   candidate words to look up if the selected word could not be found in
   the dictionary.

   This is pretty necessary for Japanese and Korean, both of which are
   highly agglutinative languages and the fuzzy searching system of
   StarDict is simply not usable because often the inflection of the
   word is so much longer than the dictionary form that sdcv decides to
   chop off the actual word and search for the inflection (which yields
   useless results).

This system is of particular interest for readers of CJK languages
(without this, looking up words using KOReader was fairly painful) but
this system is designed to be minimal and language-agnostic enough that
other languages could make use of it by creating their own plugins if
the default "whole word" highlight and fuzzy-search system doesn't match
their needs.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
Aleksa Sarai da70fe9de1 common_settings: migrate document menu to menu_order ordering
This is necessary in order to allow the language support module to be
added to the menu outside of the common_settings menu table definition.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
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>
3 years ago
Aleksa Sarai a29d24f86d geom: supplement :combine with more generic .boundingBox
It is a bit cleaner to do all of the necessary looping over lists of
Geoms within a straight-forward Geom.boundingBox function rather than
looping over :combine every time (or reimplementing :combine in some
cases). Geom:combine can be trivially reimplemented in terms of
Geom.boundingBox as well.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
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
3 years ago
hius07 22a012e729
[chore] RadioButtonWidget: remove unused "Use default" string (#8354) 3 years ago
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.
3 years ago
hius07 f0b992d425
Bookmarks: new settings and tweaks (#8301)
Bookmarks list:
- page numbers are displayed
- page bookmarks are marked with a star
- new setting: Sort by largest page number (default: checked)
New bookmark setting: Add page number / timestamp to bookmark
- If enabled (default), bookmark name is 'Page # notes @ time'.
- If disabled, bookmark name is equal to the notes field.
Rename bookmark dialog:
- page number and timestamp are displayed in the input
  dialog description
- blank input renames bookmark to the default name in
  accordance with the new setting
Also fix: changing boundaries of the highlight: the name of the
highlight is not changed if it was previously edited by the user.
3 years ago
hius07 7036500f5b
Menu widget: adapt font size of shrunken items (#8340) 3 years ago
hius07 4ffabcf087
Screensaver: correct call of BookStatusWidget 3 years ago
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.
3 years ago
yparitcher 1c2e5eee1d
BookStatusWidget: fix status toggle (#8329)
Fix:  #8324

cf: #7671
3 years ago
ichnilatis-gr a1e0d87c62
Greek keyboard: minor updates (#8319)
New popup menu on the Greek acute key for Greek numeral signs.
3 years ago
poire-z ade89cb9b6
Adds ScrollableContainer, to be used with tall widgets (#8299)
And use it with KeyboardLayoutDialog.
3 years ago
hius07 b2a7d0d5ce
BookStatusWidget: use correct read percentage (#8318)
Closes #8317.
3 years ago
ichnilatis-gr 23be2f278c
[UX] Keyboard: Fix Greek Y popup (#8308)
Correction of the "Υ" popup, where instead of Greek upsilon (as was written) there was the Greek capital tau ("Τ").
3 years ago
yparitcher feab232f35 Kopt: keep 4 items per panel
move newly enabled auto straighten from settings to crop
3 years ago
yparitcher 888802f618 kopt: allow pdf auto straighten 3 years ago
NiLuJe 75706ca0be
TextBoxWidget: Unbreak Wikipedia (bis) (#8298)
re: https://github.com/koreader/koreader/pull/8275#issuecomment-933744596
3 years ago
ichnilatis-gr e4337d1306
Greek keyboard: minor updates (#8292)
Adds Greek semicolon (upper dot) to the dot pop-up menu.
3 years ago
ichnilatis-gr c6b3d5d3a5
Greek keyboard: minor updates (#8291)
Adds Greek semicolon (upper dot) to the dot pop-up menu.
3 years ago
hius07 3fe09ecc01
CenterContainer: options to handle larger content (#8277) 3 years ago
hius07 4c9d1ac3f8
Spinwidgets: can now get width or width_factor (#8269) 3 years ago
hius07 2b87b1d8ed
Virtualkeyboard: allow grey'ing the legacy umlaut mode key (#8276)
This key is still available on non-updated keyboard layouts.
3 years ago
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)
3 years ago
zwim 0c7d174cd7
[frontlight, kobo, cervantes] Remove auto_warmth (#8154)
The feature is now provided by the "Auto warmth
and night mode" plugin (#8129).
3 years ago
zwim 9ed22df03f
DateTimeWidget: replaces DateWidget and TimeWidget (#8240)
Deduplicate code by combining DateWidget and TimeWidget.
ReadTimer plugin: some rewording.
3 years ago
ichnilatis-gr 84baf00416
Greek keyboard: minor updates (#8258) 3 years ago
zwim 20f7d14495
Plugin: Auto warmth and night mode (#8129)
("Auto nightmode" only on devices without warmth.)
3 years ago
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
3 years ago