Commit Graph

83 Commits (5871132c2559f5456ca4b8398957a7e6832c190e)

Author SHA1 Message Date
NiLuJe 5871132c25
UI Behavior tweaks (#3983)
* Switch all initial highlights to "fast" update

i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130

* Tweak refreshtype for a number of widgets:
  * Fix iconbutton dimen
  * Make touchmenu flash on close & initial menu popup. Full-screen on close.
  * Use flashing updates when opening/closing dictionary popup. Full-screen on close.
  * Switch FileManager to partial.
    It's mostly text, and we want flash promotion there.
  * Make configdialog & menu flash on exit
  * Make FLWidget flash on close
  * virtualkeyboard: flash on layout change & popup.
  * Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
  * Flash when closing BookStatus Widget
  * Optimize away a quirk of the dual "fast" update in touchmenu

* Promote updates to flashing slightly more agressively.

* Document what each refreshtype actually does.

With a few guidelines on their optimal usecases.

* Switch remaining scheduleIn(0.0) to nextTick()

* Tighter scheduling timers

Shaving a hundred ms off UI callbacks...

* Cache FFI C Library namespace

* Ask MuPDF to convert pixmaps to BGR on Kobo

Fix #3949

* Mention koxtoolchain in the README

re #3972

* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity

* Make black flashes in UI elements user-configurable

(All or nothing).

* Jot down some random KOA2 sysfs path
6 years ago
poire-z 2473ebce01
Wikipedia link: check if previously saved as EPUB (#3837)
Also makes MultiConfirmBox movable, like ConfirmBox is.
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
poire-z b46628c08c
new option: Save Wikipedia EPUB in current book directory (#3762)
Also uses PathChooser (instead of InputDialog) in 'Set Wikipedia
Save as EPUB directory'. When setting not yet set, propose to
create and use ~/Wikipedia/ .
6 years ago
poire-z 48da3dc750
Fix some issues with movable dict window (reworked) (#3726)
Clearer rework of this fix (a few commits ago): more explicite,
no need for the additional callback.
6 years ago
poire-z e7f705bf10 Fix some issues with movable dict window (#3722)
Some Hold and move (hold on title and move away from it) would not work.
Pan (=swipe with hold at end) while selecting text would move the
window (it now does nothing: proper text selection still needs Hold
on word at start).
Also increase hold duration from 2s to 3s (for switching lookup
between dict/wikipedia) to be consistent with the 3s duration in
readerhighlight.
6 years ago
poire-z b0f0e839fb [UX] Dict: scroll back with tap: go to bottom of prev definition (#3647) 6 years ago
poire-z 43a6cf4b2e Add MovableContainer: allow moving some widgets (#3636) 6 years ago
poire-z 43ad2cef99 TextBoxWidget: optionally display a list of images
(each one at top right of each page)
Such images can be loaded dynamically when the display of a page requires it.
Allow alternating between the image and its title with Tap on it.
Allow for viewing this image zoomed in ImageViewer with Hold on it.

DictQuickLookup: add generic support for result.images, that
could optionally be provided in Wikipedia lookup results.
6 years ago
TnS-hun b40bc53fc7 HTML dictionary link support (#3603) 6 years ago
poire-z 262e55d0ae Dict: make html and text results look similar (#3582) 6 years ago
poire-z bfb07c79ef Fix: scale html dict result font size (#3581) 6 years ago
TnS-hun 06a8a33d39 HTML dictionary support (#3573)
* Adds a generic HTML widget modeled after the text widget, and HTML dictionary support. HTML dictionaries can have their own CSS (for X.ifo it must be X.css). The base CSS just resets the margin and sets the font.

Note that the widget doesn't handle links, that wasn't needed for the dictionary.

Closes <https://github.com/koreader/koreader/issues/1776>.

* Show tag stripped HTML if the dictionary entry isn't valid HTML

* Simulate the normal <br/> behavior

* Bump base
6 years ago
TnS-hun 29b376fdd9 [UX] Option to show dictionary in large window (#3499) 7 years ago
Robert 178555180f [fix] Disable Highlight button when text is not selected (#3457) 7 years ago
poire-z 99161d6b03 Wiki save as epub: close highlight menu when switching document (#3417) 7 years ago
poire-z 3639c3e7c6 [UX] Fix dict title width to not go over CloseButton (#3414) 7 years ago
poire-z 8aa26edeb6 Fix some widget title height and close button alignment (#3366) 7 years ago
poire-z 8c700eefd9 Avoid some full refreshes on Kindle (#3315)
"partial" refresh causes a full (without black flash) refresh on
Kindle (which uses REAGL mode for partial refresh). This causes a
full redraw of widgets, which is a bit distracting with some of them:
- dictquicklookup: when showing next definition
- infomessage: when displaying a new one (Wikipedia Save as epub)

Also fix bottom menu, that even when closed, would still register
bottom area as dirty: this would cause top menu navigation to
cause a full partial refresh, only noticable on Kindle.
7 years ago
Frans de Jonge a6be301695 Added Size module 7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
poire-z 5828ef8f1c Fix potential crash when clearing hold highlight (#3241)
A delayed clear() could reset hold_pos while a onHold/onHoldPan/
onHoldRelease is in progress, resulting in hold_pos becoming nil and
a crash.
7 years ago
poire-z 941d77f6bc Reduce unhighlight delay when closing dict (#3239) 7 years ago
poire-z 79dca8e245 [UX] Wikipedia save as EPUB: allow for aborting download (#3224) 7 years ago
Frans de Jonge 7310937219 [fix] "Follow Link" popup issues (#3198)
* Add current location to location stack from follow link popup
  See https://github.com/koreader/koreader/pull/3190#issuecomment-328332771
* Word highlight not removed
* "Follow Link" not translated
* Typo in docs
7 years ago
Frans de Jonge f439ca0e8d [UX] Add "Follow Link" in hold/highlight dialog (#3190)
* This way you can disable "tap to follow links" on single tap yet still follow links.
* Change menu as well as per @poire-z's suggestion.
7 years ago
Robert 568e8f667a Fix: Crash when highlight a word (#3155)
* Fix: Crash when highlight a word

* reorganize highlight strings

* Remove redundant var
7 years ago
poire-z 5d2bebcc0b Added Dictionary settings and Wikipedia settings menus (#3121)
Also removed OPDS `download_dir` from the candidates to Wikipedia
"Save as EPUB" dir.
7 years ago
poire-z c3778bdb2a Button and TextWidget: added max_width attribute
Simple way to ensure overlong text is truncated.
Used by dictquicklookup to truncate long titles.
7 years ago
Robert 4d0f66a354 Fix: Unhighlight is not clickable in dictionary view and Deleting highlights in bookmarks does not take effect (#3034)
* Fix: Unhighlight is not clickable in dictionary view
* Fix: Deleting highlights in bookmarks does not take effect
7 years ago
poire-z 9e346f5559 Allow wikipedia lookup from filemanager
Also allow taking screenshot when on dictionary window.
7 years ago
Robert f21550b3d5 minor: translate "Save as epub" and "Close" in full Wikipedia window (#2875)
* translate save as epub and close

* epub to EPUB
7 years ago
Frans de Jonge e1aa57f27e Font: unify font styling 7 years ago
Qingping Hou fc12ee6537 decouple reader footer from dictquicklookup widget & translation fix (#2664)
* chore: fix strings for translations

* dictionary(chore): decouple reader footer from dictquicklookup widget
7 years ago
poire-z 39d1afe37d Update footer when refreshing screen with diagonal swipe
And added diagonal swipe support to readerrolling.
7 years ago
Frans de Jonge 6257bae77f Language: mostly Wikipedia-related changes 7 years ago
poire-z 2ded2bce5e Wikipedia: save full page as epub (html, with optional images)
Also for the current text-only wikipedia full page: replace
the ==s in section titles with some unicode symbols for a better
visual feeling of hierarchy. These same symbols are also used
in the .epub.
Both can be disabled by adding ["wikipedia_prettify"] = false
to settings.reader.lua

readerhighlight: close ButtonTable (like other buttons do) when looking
up wikipedia, otherwise if we save as epub, and swtich to new document,
this ButtonTable will never be closed and stays in UI.
7 years ago
poire-z 130f7b0773 wikipedia: fix languages rotation and query
Fix innacurate language query and rotation when back from nested lookups.
More informative lookup message (langage used, search or full page)
Allow for screen refresh with diagonal swipe (like in readerpaging).
7 years ago
poire-z ebe0c08bfb dict/wiki: definitions' text justification
This can be disabled by adding ["dict_justify"] = false to settings.reader.lua
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Hzj_jie 5bda44473d Add dictionary to filemanager 7 years ago
poire-z 1708fd5e1c Dictionary and wikipedia enhancements (#2393)
Stardict:
- remove duplicate results
- better cleaning of selection
- append results from a 2nd query of a 2nd set of dictionaries
  in data/dict_ext/

Wikipedia:
- use the search API for better results
- allow viewing the full page content of a result in a bigger window
- allow queries for multiple languages
- available languages can be set in settings.reader.lua :
    ["wikipedia_languages"] = {"en", "fr", "it"}
- "Wikipedia lookup" added to Tools menu

For both:
- allow selection of multiple words for a new lookup (so one can
  actually browse wikipedia)
- allow continuous reading with Tap
- display "current result / total number of results"

Details in #2393
8 years ago
Qingping Hou b2e1d9dc42 dictquicklookup(chore): simplify logic that disables wikipedia button 8 years ago
robert00s 2238fdc882 Fix #2328 8 years ago
Qingping Hou a10a4f65a5 minor: use predefined color instead of gray method 8 years ago
chrox 1c5c7d3a7c fix #1682 by closing all dict windows when holding close icon 8 years ago
chrox 40858c670a restrict dictionary window inside of screen especially in landscape mode
This should fix #2020.
8 years ago
Qingping Hou adf5ffdd26 dictquicklookup(fix): use self.region for matching hold event 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