Commit Graph

44 Commits (dcb11c2542ae0c45a65a763dac1df08a844becf3)

Author SHA1 Message Date
NiLuJe dcb11c2542
Make luacheck >= 0.26 happy (#9174)
Re: https://github.com/koreader/koreader-base/pull/1487
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 19271c08c4
Checkbutton widget optimization (#8522)
-checkmark toggling is separated from the callback
-default width added
2 years ago
hius07 58c4db694e
readersearch: do not show regexp checkbutton in pdf (#8450)
Minor optimization.
3 years ago
Frans de Jonge 8e017de898
ReaderSearch: remove stray newline from regex help (#8358)
Noticed due to #8356.
3 years ago
hius07 859327dea5
Input dialogs: keep size in rotation (#8223) 3 years ago
hius07 5b049a5a82
Help text fixes (#8217)
* Update css_tweaks.lua

* Update readersearch.lua
3 years ago
hius07 dd1b10332e Readersearch: reduce icon size in search dialog 3 years ago
hius07 e16d36d5da
Readersearch: add button to recall search input dialog (#8190) 3 years ago
hius07 ab4e27908b
Standardize: long-press/hold to long-press (#8185)
* Gestures: standardize hold to long-press

* Common settings menu: standardize hold to long-press

* Readerstyletweak: standardize hold to long-press

* Readersearch: standardize hold to long-press
3 years ago
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.
3 years ago
hius07 68782c3f89
Checkbutton: optimize callback (#8134) 3 years ago
hius07 c8a7f52672
Checkbutton: ensure max width, multiline if needed (#8066) 3 years ago
zwim 26cc3df5c5
ReaderSearch: fix wait button position, code cleanup (#7973) 3 years ago
Frans de Jonge 86a1552ccd
Fix wrong escape (#7952)
;-)

Assuming you want it to show up as `'\'`, anyway.
3 years ago
zwim 4d9d599a6a
CRe: fix issues with case sensitive and regex search (#7947)
Fix crash with previous commit.
Show regex checkbox only with cre documents.
3 years ago
zwim 826a765705
CRe: support for case sensitive and regex search (#7883)
- bump crengine: findText(): add support for regular
  expression search.
- bump base: add thirdparty/srell/srell.hpp, a C++ library
  that provides Unicode regex support, used by crengine.
- ReaderSearch: with credocuments, add checkboxes for case
  sensitive and regular expression search.
3 years ago
hius07 aef1e271b5
[UX] Search dialogs: don't close when searching with nothing entered (#7501)
File search, Fulltext search, Search dictionary, Search Wikipedia, DictQuickLookup: do nothing when nothing entered and search is pressed.
3 years ago
hius07 b907386933
Fulltext search: show notification when nothing found (#7436) 3 years ago
NiLuJe 0e130d6a17
ReaderSearch: Switch to a real InputDialog (#7360)
Instead of piggybacking on InputContainer's onInput trickery for hold_input & tap_input.

Also, don't flag the buttons from that InputDialog as vsync, because that was stupid ;).

Fix #7357
3 years ago
NiLuJe 0c76c73e4f
Assorted fixes after #7118 (#7161)
* I'd failed to notice that ButtonTable *also* instantiates seven billion Buttons on each update. Unfortunately, that one is way trickier to fix properly, so, work around its behavior in Button. (This fixes multiple issues with stuff using ButtonTable, which is basically anything with a persistent set of buttons. A good and easy test-case is the dictionary popup, e.g., the Highlight button changes text, and the next/prev dic buttons change state. All that, and more, was broken ;p).

* Handle corner-cases related to VirtualKeyboard (e.g., Terminal & Text Editor), which screwed with both TouchMenu & Button heuristics because it's weird.

* Flag a the dictionary switch buttons as vsync

(They trigger a partial repaint of the dictionary content).

* Flag the ReaderSearch buttons as vsync

They very obviously trigger a partial repaint, much like SkimTo ;p.
3 years ago
poire-z 7952fa2c09 [RTL UI] update widgets and apps for UI mirroring
Small tweaks all around to handle UI mirroring:
- swap existing symbols like arrows, or use alternative ones
- rotate some images, like chevrons and dogear icons
- flip some left and right swipe handling
- flip some geometry arithmetic like tap on left or right
  side of page or dict window
- use new ProgressWidget:getPercentageFromPosition() instead
  of geometry arithmetic
- BD.wrap() some concatenated string bits, like in reader
  and menu footers
- flip inverse_reading_order when UI is mirrored

More specific tweaks:
- ReaderGesture: reset some specific gestures when UI direction
  has changed (tap on top/bottom left/right corners, for
  bookmarks and FileManager "Plus menu").
- ReaderRolling: show markers on the correct side of page,
  in single or dual page mode.
- KoptOptions: swap left and right icons in Alignment toggle
- CheckMark: proper rendering in all 4 mirroring/rtl combinations.
- VirtualKeyboard: forbid any mirroring
- Move util.getMenuText into Menu.lua
5 years ago
Frans de Jonge f6270278aa
[feat] Implement fulltext search direction (#5283)
Closes <https://github.com/koreader/koreader/issues/5054>.
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
Frans de Jonge e96ac7e7dc
[UX] Gesture manager: add action - fulltext search (#4715)
Fixes #4687.
5 years ago
poire-z e21fe55042 [UX] Remove search highlights when closing search bar (#3804)
They were indeed removed, but no full screen refresh was requested,
so the highlights stayed visible.
6 years ago
poire-z 59496c1d46 Show vertical marker at original position when back from link (#3669)
ReaderLink: make all links be a table (they were a table for PDF,
but a string for CRE) for clearer code. Also have location_stack
store them as tables, with additional properties.
Get original position of link source (and verify it is valid)
so we can show a marker there.

Also:
Hold on "Go back to previous location" to clear location stack.
Resists "Swipe to go back" when previous locations stack has just
become empty, and show a notification.
Fix wrong links with Swipe to follow nearest link on PDF documents.
6 years ago
poire-z 5357fdde7c
cre full text search: fix inconsistencies (#3656)
Fix various inconsitencies: some occurences not highlighted
on displayed page; different occurences highlighted on same
page wheter we went there searching backward or forward; pages
with occurences simply just skipped when searching in one
direction, and not in the other...
To avoid edge cases, crengine will now give back results on up
to 3 pages, that we need to filter.
Bump base and crengine
6 years ago
poire-z a3e2a8073f Full text search: when Go back, go back to initial page
Only add the initial page to the location stack - and not
every search result's page - so we can easily go back to it.
6 years ago
poire-z 43a6cf4b2e Add MovableContainer: allow moving some widgets (#3636) 6 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
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
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 d1785e1863 Reorganize menus
* Replace "home" (exit) menu with hamburger
* Discard pokeball and put items in hamburger
* Introduce search menu in reader

Cf. #2562
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
chrox 551857ce6e fix some luacheck warnings 8 years ago
chrox 5bbcae954e fix #2060 by handling blank search pattern 8 years ago
Qingping Hou e422842256 minor: a lot of luacheck fixes 8 years ago
chrox 2ad21dcaa2 only strip punctuations when highlight to search
This should fix #1419.
9 years ago
chrox 07586cea71 strip punctuations around word before searching
This should fix #1337.
9 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox b80dd1f966 add fulltext search for PDF documents 10 years ago
chrox bd0975896d add fulltext search for EPUB documents 10 years ago