Feature of ScrollTextWidget, only used for now by TextEditor.
Pan is like Swipe, but wait a bit at end of gesture to release:
the line on which Pan was started will be moved to where Pan is
released.
May conflict with MovableContainer (so not enabled for DictQuickLookup,
where it could have been nice - but it would work only with text
dictionaries, not with HTML ones, as ScrollHtmlWidget can't really
do that).
* Bump base
* Fix tar flag ordering in OTAManager
So that no-recursion actually gets honored, preventing us from creating
extra-large archives with unrelated content...
(Tar started being pickier about flag ordering in a recent version bump).
Fix#4147Closes#4148 (by superceding it)
Don't consider sidecar file when sorting by access time.
Rename 'sort by title' to 'sort by filename':
This is in accordance with the actual function of the code, which
uses filename rather than title as specified in file metadata.
This plugin mostly sets up a "Text editor>" submenu, that allows
browsing files, creating a new file, and managing a history of
previously opened file for easier re-opening.
It restore previous scroll and cursor positions on re-opening.
Additional "Check lua" syntax button is added when editing
a .lua file, and prevent saving if errors.
The text editing is mainly provided by the enhanced InputDialog.
InputDialog: added a few more options, the main one being
'save_callback', which will add a Save and Close buttons
and manage saving/discarding/exiting.
If "fullscreen" and "add_nav_bar", will add a show/hide keyboard
button to it.
Moved the preset buttons setup code in their own InputDialog
methods for clarity of the main init code.
Buttons are now enabled/disabled depending on context for feedback
(eg: Save is disabled as long as text has not been modified).
Added util.checkLuaSyntax(lua_string), might be useful elsewhere.
Explicit new options: select_directory, select_file, show_files.
With select_directory, show an entry to select current directory
(so, removed undocumented hack "hold on .. to select current
directory").
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
InputText: checks whether provided content can be given
back unaltered, which may not be the case after it is
splitted to UTF8 chars if the text is binary content.
Prevent editing text if that is the case.
Adds InputText and InputDialog :isEditable() and :isEdited()
methods.
Also accounts for the scrollbar width when measuring text
to prevent it from being displayed when not needed.
Also ensure a minimal size of the scrollbar thumb so it is
rendered when huge text with many lines is displayed.
Virtual keyboard: Hold on Backspace: delete from cursor
to start of line instead of clearing all text content.
* Make findcalibre actually useful
By setting SEARCH_LIBRARY_PATH when a Calibre tree is found, so that
book paths can properly be constructed.
Users should still very much set it themselves, but at least everything
works as intended when not, instead of mysteriously half-breaking later.
Drop the SetDefaults bits, it appeared to have been added to fix no-ops
detected by Luacheck, and it's actually non-functional, because
SetDefaults doesn't handle saving variables it did not itself assign.
So this was just causing the "Do you want to save new defaults" popup to
show up on exit, but it couldn't actually do anything useful (like, say,
save the new SEARCH_LIBRARY_PATH value).
fix#4082
* Better comments about the state of NaturalLight on the Clara, and how this might translate to the H2O²r2.
re #4015
* Make ScrolltextWidget refresh as "partial" only on actual Scroll events
Moving the cursor should stay "ui", or things gets annoying really fast
;).
re #4084
* Bump base to pickup ZMQ fixes (fix#4086)
InputText, ScrollTextWidget, TextBoxWidget:
- proper line scrolling when moving cursor or inserting/deleting text
to behave like most text editors do
- fix cursor navigation, optimize refreshes when moving only the cursor,
don't recreate the textwidget when moving cursor up/down
- optimize refresh areas, stick to "ui" to avoid a "partial" black
flash every 6 appended or deleted chars
InputText:
- fix issue when toggling Show password multiple times
- new option: InputText.cursor_at_end (default: true)
- if no InputText.height provided, measure the text widget height
that we would start with, and use a ScrollTextWidget with that
fixed height, so widget does not overflow container if we extend
the text and increase the number of lines
- as we are using "ui" refreshes while text editing, allows refreshing
the InputText with a diagonal swipe on it (actually, refresh the
whole screen, which allows refreshing the keyboard too if needed)
ScrollTextWidget:
- properly align scrollbar with its TextBoxWidget
TextBoxWidget:
- some cleanup (added new properties to avoid many method calls), added
proxy methods for upper widgets to get them
- reordered/renamed/refactored the *CharPos* methods for easier reading
(sorry for the diff that won't help reviewing, but that was needed)
InputDialog:
- new options:
allow_newline = false, -- allow entering new lines
cursor_at_end = true, -- starts with cursor at end of text, ready to append
fullscreen = false, -- adjust to full screen minus keyboard
condensed = false, -- true will prevent adding air and balance between elements
add_scroll_buttons = false, -- add scroll Up/Down buttons to first row of buttons
add_nav_bar = false, -- append a row of page navigation buttons
- find the most adequate text height, when none provided or fullscreen, to
not overflow screen (and not be stuck with Cancel/Save buttons hidden)
- had to disable the use of a MovableContainer (many issues like becoming
transparent when a PathChooser comes in front, Hold to paste from
clipboard, moving the InputDialog under the keyboard and getting stuck...)
GestureRange: fix possible crash (when event processed after widget
destruction ?)
LoginDialog: fix some ui stack increase and possible crash when switching
focus many times.
The Dogear icon is 20x20 pixels and was never scaled where used. Now:
- The bookmark icon (top right of screen) is scaled to 1/32th of the screen
width (previously, it was 1/30th on a 600px wide emulator, 1/53th on a GloHD).
On CreDocument, furthermore decrease its size if needed depending on the
selected margins so it never overwrite the text.
- CoverBrowser list view: scale it to the available room under
the "N % of P page" text, so it does not cover "page".
- CoverBrowser mosaic view: scale it to 1/16th of the cover rectangle, which
should prevent if from overwritting the text thanks to a max text width of
7/8 of the cover rectangle.
Also for CoverBrowser: don't index metadata for unsupported document
(which could happen when browsing files with PathChooser) and show
full filename for such documents.
Also: ImageWidget: small fix in case we use both scale_factor and
scale_for_dpi.
* Unbreak dropbear after #4077
* Move the Kindle SO check to init
* Various virtual keyboard fixes to eradicate the remaining refresh conflicts (i.e., tearing artifacts), no matter the user's settings. (re #4069, re #3130).
- add refresh after tap Cancel button,
- radiobutton and checkbutton with the same font size,
- truncates text outside window,
- better control font face and size in OpenWithDialog
and RadioButtonTable widgets
* Reader menu: adds "Open previous document"
Allows for quick switching between 2 documents, and keep
symmetry with FileManager menu "Open last document".
* Use "Last:" and "Previous:" when Show filename
* Handle OTA updates during the restart loop on Kobo/Kindle
So we can actually process OTA updates without ever truly exiting
KOReader (i.e., via the "Restart KOReader" menu entry) ;).
* With a bonus version normalizer fix.
* And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).
* Discard dotfiles when looking for fonts
So as not to pickup, among other things:
* macOS resource forks
* *nix hidden files (which may be stale fuse ghosts on Kindle)
* Update Kindle font blacklist
Up to FW 5.9.6
Basically blacklist anything non-LGC, requiring lab126's FT build, or FC tweaks.
One day we'll fix CRe instead, maybe.
* Link to the WiKi, it's a bit more explainy ;).
* More WiFi trickery for some HW revs
* Fix Rev2 detection under KSM
That's to future-proof it, the other end of this hasn't made it into
current KSM build yet.
* Resync nickel.sh w/ current rcS
We don't have CPU, but we have PLATFORM, which is based on CPU, so,
that'll do :).
* Go back to using rmmod instead of modprobe -r
Functionally identical on current FW, will potentially avoid getting
outsmarted by modprobe if Kobo ever deigns shipping an actually usable
Linux system one day...
* Don't crash if screensavers directory doesn't exist
c.f., https://www.mobileread.com/forums/showpost.php?p=3706979&postcount=2919
Includes:
- Avoid page break between a node and its borders
- Allow building an alternative TOC from document headings
On CRE documents, allows toggling between original TOC and an
alternative TOC with long-press on the "Table of content" menu
item.
Also update the Wikipedia stylesheet to further avoid
page-breaks between images and their caption, so a full
bordered wikipedia thumbnail is always full on a single page.
* 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
- Fix getting xpointer to current page
- epub.css cleanup
- fb2def.h update
- Fix a few edge-case rendering issues
- Fix border being drawn in spite of 'border-width: 0'
Also update Wikipedia epub.css stylesheets regarding
recent HTML fixes and enhancements.
Remove "Remove all borders" workaround tweaks, as it's
now fixed.
(Unit tests failure to be fixed in upcoming commit)
Books previously opened (that have a metadata.lua, whether with
highlights or not, but because they all have a last_xpointer that
points to the current page, that can be broken too by the changes)
will continue to have the old wrong behaviour, so they won't be
impacted by the breaking changes.
Update cre_dom_version code to use the new functions from cre.cpp.
Remove these Workarounds from Style tweaks.
Alternate rendering of list items as block elements (instead of
inline/final).
Check the built DOM is still coherent with styles on stylesheet
change, and propose to reload the document if not. Also
invalidate cache on close in that case so a new DOM is built
at next opening.
ReaderStyleTweak: fix tweak css duplication; when globally
enabled, when disabling and re-enabling locally, the css would
be added twice to the final CSS.
Also adds !important to "sub_sup_smaller" tweak, and increase
its priority so it can override "font_size_all_inherit".
Adds CreDocument:getCacheFilePath() for futur features.
Changed from 1 second to 2.
I also fixed the problem with blocking the UI when displaying the message. Now notification box is closed after taping anywhere (like InfoMessage).
* Minor cleanup
We don't ship Droid Sans Fallback anymore
* Tweak UI fallback font list for better coverage
* Bump base & fonts
To pickup related changes
Also allows for updating the fallback font and see results
in real-time on the underlying document.
Bump crengine for: fix updating fallback font
Also adds a menu item to generate a html document showing some
sample text rendered with each available font (only if the user has
a file koreader/settings/fonts-test-sample.html with some HTML
snippet of his choice).
Avoid drawing the fill bar our of the progress bar.
Avoid zero divided by zero that return 'nan' (Not a Number),
that does not bother lua code, but will crash libblitbuffer.so
when it gets nan as a coordinate.
New module RenderImage (alongside existing RenderText) to provides
image rendering and scaling facilities.
Uses MuPDF, but tries first giflib on GIF.
Allows for getting all the frames from an animated GIF.
When hyphenating a word, the existing algorithms enforced a minimal
length of 2 for each word fragments on left or right side.
This adds a widget to allow changing these minimal sizes (from 1 to 10).
Removed width:80% as it was never supported by crengine (the effect
was achieved thanks to margins and paddings).
Wikipedia saved articles from now on won't be effected by a double
effect if we later add full support for width: into crengine.
* Wiki Save as EPUB: various encoding fixes
Fix display of & in article titles
Fix display of &, <, > in TOC entries and in targeted anchor (the mismatch
with the target id made these TOC entries invalid and simply not displayed).
Remove percent-encoded URLs tweaks for crengine now that crengine
correctly supports them (each percent encode handled as an UTF8 byte).
Bump crengine for that.
Don't include <meta name="cover"> when no cover present.
* bump base/crengine
Transifex warns about some issues but this is not one of them.
The proper solution would be `padding_right`. But although it's supported on FrameContainer it's not passed on through TextBoxWidget.
If the device supports it, add a checkbox for enabling automatic
warmth, and a widget for setting the hour at which warmth should be
maximal ("bedtime").
The hour can be changed through +/- buttons; holding them will change
with 30min steps. As soon as automatic warmth is enabled, the 'warmth'
cannot be changed manually anymore, so we make its widget grey, but
the current value is still displayed correctly. Changing the hour
changes warmth accordingly.
* [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
* [toggleswitch] Add support for key navigation to this widget
Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected
* Add key navigation to the readermenu
The shortcut is still Alt-gr on sdl, to be defined on Kindle
* Remove the old method of handling the Press key.
Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices
See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
Emulate the hold touch behavior on non touch device by clicking the right key
ButtonTable: do not add vertical separator to the layout because the focus
manager can't traverse them. Add check to make disabled button non-clickable.
Navigating the TOC, viewing a full screen image, browsing
reading stats... would call paintTo() on ReaderUI (so, asking
the engine to render the page) or FileManager (so, rendering cover
images) even though their content is hidden.
Widgets registering to UIManager have to explicitely states
they cover the full screen (UIManager can't know, parts of their
dimen may be transparent, e.g. if it is a CenterContainer).
Also uses PathChooser (instead of InputDialog) in 'Set Wikipedia
Save as EPUB directory'. When setting not yet set, propose to
create and use ~/Wikipedia/ .
* [device][kindle4] add fake event to kindle4
* modify focusmanager to allow for more complex layout
The focusmanager now naviguate the layout by avoiding nil value
instead of relying on table lenght. It should be completely backward
compatible
* add Dpad naviguation to the touchmenu
* fix crash because virtualkeyboard on non touch device
the kindle4NT has no keyboard nor touch, the fix open the virtual
keyboard so koreader dont crash but it's not useable
* Enable device with keys to use the touchmenu
* Don't get stuck in reader progress statistics plugin
* [underlinecontainer] Fix and remove unused function
References #1898.
For devices with natural light (KA1, H2O2), add new button 'Configure'
at the bottom which will open the naturallightwidget, which will be
placed at the top. The frontlightwidget will be moved to the bottom,
and both have permanent focus. This way, you can change the parameters
and immediately test them by changing the frontlight level and
warmth. On the KA1, both widgets will easily fit, but on smaller
devices it may be that they overlap.
Since the frontlightwidget will keep focus, we disable the 'Configure'
button when the naturallightwidget opens. We also remove its 'Close'
button and disable 'onTapCloseFL', so that the frontlightwidget cannot
be closed while the naturallightwidget is displayed.
This widget is used to configure the natural light on KA1/H2O2. It
allows the user to set the gain/offset values for white/red/green, as
well as the exponent used in the formula.
Numbers can be changed via screen keyboard or through the plus/minus
buttons next to the numbers (holding the buttons will in/decrase with
smaller steps). Changes are applied immediately, but will only be set
permanently if 'OK' is pressed. If 'Cancel' is pressed, the new values
are discarded and the old ones restored. Also, pressing 'OK' will save
these values in the koreader settings file (there's no support for
changing these values in Nickel, so there's nothing to sync to its
config file). The 'Restore Default' button will install the original
defaults that were derived from Nickel's behavior.
This widget is meant to be called from the frontlight widget and is
placed at the top, so that the frontlight widget can still be used to
test the current values (see next commit).
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.
If the device supports natural light (currently only KA1), extend the
frontlight widget to also allow for changing the 'warmth' value. We
more or less duplicate the widget for 'brightness', with the exception
that we drop the 'toggle' button, which does not make much sense for
the frontlight's warmth. Also, we add captions 'Brightness' and
'Warmth' for clarity.
First item would be underlined if the device is both Touch and Keys
capable (emulator, android, pocketboot...), which is not really
pretty. Delay that till Keys for focusing are really used.
Also fix some bad filename and extension in epub's OEBPS/content.opf,
Store image files (jpg, png, gif) uncompressed in the .epub as they
don't need compression.
crengine may now give us multiple authors (if multiple <dc:creator>
in epub metadata) separated by \n.
Deal with that where needed.
Limit the number of authors displayed in coverbrowser views.
Bumped base/crengine: multiple <dc:creator> + fix mobi images order
Bumped base: util.runInSubProcess(): give child its own process group
When no manually added specific 'poweroff' or 'reboot' screensaver
settings, use the suspend/sleep settings set via menu with an added
overlay message in top right corner.
Generalized some settings: "White background behind message and images"
and "Stretch covers and images to fit screen", and move "Exclude this
book's cover from screensaver" up a level (and remove this menu item
added by ReaderMenu when closing document).
Don't use memory cache with rendered screensaver images.
ImageWidget: fix wrong behaviour (stretch) when 'file', 'width',
'height' and 'scale_factor' provided: now, keep aspect ratio.
ImageWidget: increase file image mem cache (mostly used for icons)
from 2 to 5MB to be ready for devices with very high DPI.
(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.
New TrapWidget: invisible full screen widget for catching UI events. Can
optionally display a text message at bottom left of screen (ie: "Loading..."),
used by default by Trapper:dismissable functions when no widget provided.
Added Trapper:dismissableRunInSubprocess() to run a lua function in
a sub-process, allowing it to be dismissed, and returns its return
value(s).
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
* 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
Use "message" as the default for screensaver (instead of "disable") (https://github.com/koreader/koreader/pull/3535#issuecomment-353337143)
On Kobo
Fix: display message on poweroff or reboot (https://github.com/koreader/koreader/pull/3535#issuecomment-352355865)
Allows for overwritting these default messages with the classic screensaver settings, by just prepending "poweroff_" or "reboot_" to them. (https://github.com/koreader/koreader/pull/3535#issuecomment-352498497)
So one can manually add to its settings.reader.lua:
```
"poweroff_screensaver_type" = "random_image" or "message", "cover", "bookstatus", "readingprogress", "disable",
"poweroff_screensaver_dir" = "path to same as screensaver_dir or alternate dir for poweroff image(s)",
"poweroff_screensaver_message" = "message to use instead of Powered off",
```
```
"reboot_screensaver_type" = "random_image" or "message", "cover", "bookstatus", "readingprogress", "disable",
"reboot_screensaver_dir" = "path to same as screensaver_dir or alternate dir for reboot image(s)",
"reboot_screensaver_message" = "message to use instead of Rebooting...",
```
Partial, as it will safe the state when suspending the reader by pressing the power-button.
However, it will still not safe the state when Pocketbooks autoPowerOff-Feature kicks in, as this does not create an event (e.g. no EVT_BACKGROUND) of any kind.
* Clean up device.lua
* Save state on suspend
* Properly create intermediate directories when receiving books from Calibre.
This fixes an issue where you can't receive books except into directories that
already exist on the Kobo, which, in particular, causes problems when your
configuration in Calibre is something like "put books in $Author/$Title.epub"
and you haven't previously synced any books by that author.
* Wake up periodically to process ZMQs if any are registered.
This fixes an issue where if there are any timed events (such as the suspend
timer) in the queue, ZMQ events may not get processed until the timed event
fires, which is a problem when (for example) the suspend timer goes off in
an hour and you have something trying to send a book to the kobo over wifi
*right now*.
With this change, the event loop will wake up every 50ms to check for ZMQ
events and process them if necessary. If there are no ZMQs registered (which
is typical), it uses the original behaviour -- so this won't affect battery
life under normal usage.
- Fix links to wikipedia pages containing '?oldid=123', that
wouldn't work when used back thru the API.
- Make external links to other wikipedias with a different langage
work (they didn't work when non-ascii page titles)
- Speedup download of images by using a newly added 'fast_refresh'
option to Trapper:info() to bypass UIManager.
* Prevent open screensaver more than one in the same time
* Add option to enable/disable background in message screensaver
* fallback to random images if this book cover is excluded feature + fix Disabled (leave screen/page as it is)
* Autostretch disable by default, more fallback options, leave screen as it is
This feature, introduced some days ago, was actually
doing 2 updateItems calls: the initial one, and a second
to switch to focused_file page (cheap with classic display mode,
less cheap with CoverBrowser modes).
This change allows doing that in a single call.
To make it more alike bottom menu:
- left and right border not displayed
- line below icons extends to screen borders
- same bottom border size
And make separator lines have same padding on both sides
When going from reader to filemanager, we are in the directory
containing the last_file. With this, we will also be on the page
showing this file.
When in filemanager and going up (".."), we will also be on the
page containing the directory we came from.
Rationalize horizontal construction of Menu items (TOC,
Bookmarks, Classic file views) for more even padding.
Align "x" close button diagonaly with top right border and title.
Also add forgotten scale_for_dpi to MultiConfirmBox
This makes button heights similar in all uses of ButtonTable.
It depended on how the ButtonTable was used in each widget
(previously, first and last row may have different sizes than
the others).
buttontable.lua: more even buttons height whether zero_sep or not
framecontainer.lua: added padding_top/bottom/left/right (similar to
what was done for iconbutton)
The following widgets have been adapted for this, with some
additional fixes:
buttondialog.lua
buttondialogtitle.lua: wider title with adequate padding
confirmbox.lua + multiconfirmbox.lua: dismissable via tap outside
inputdialog.lua + multiinputdialog.lua: more even vertical padding between elements
imageviewer.lua
textviewer.lua
datewidget.lua
timewidget.lua
Additionaly: frontlightwidget.lua: fixed width of progress bar that
was exceeding window width since the Size scaling adjustements
Decide baseline vertical position according to font metrics, instead
of the hardcoded 0.7 (in textwidget, which made the text a little
bit up in its box), and 0.75 (in toggleswitch, which made the text a
little bit down in its box). This usually gives a value around 0.72
or 0.73 with our ui fonts, which looks about right.
ReaderFooter: add bottom padding, now that our text goes a few pixels lower
"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.
* Fix crash with keyboard navigation of onHold buttontables
Would crash when encountering a separator or when the number
of buttons in a row changes.
* Reset previous selected item on new buttontable
For years they've been smaller on higher DPI devices and likely very few people realized it was technically a bug. These values round up on lower DPI and smaller screen devices.
References https://github.com/koreader/koreader/issues/3265
Closes: #3236 and #3235
Details:
> Also, when looking in days, we see info how many hours we read. It would be great if we could tap a day, it opens info on book(s) we read that day with info pertaining to that day, and if we tap on book, we receive book info for that book.
> Statistics plugin is really great, I started to look in my reading statistics now much more, but all the time I can go only in one way. And I need to exit at lowest level of info. It would be great if I can use statistics plugin like part of menu, to go up and down within statistics data and exit at my wish, not when I have to.
Also added:
* new statistics book by week
* new statistics book by month
* last year by week now we can see days in selected week
* Cache scaled images with scale_for_dpi
* Don't update original self.scale_for_dpi
A same ImageWidget object can be free()'d and re-render()ed,
and we would then lose scale_for_dpi on next renderings
Made the onHold buttons table similar to the one of File browser.
Added "Purge .sdr" and "Delete" to these buttons.
Moved the purgeSettings and removeFileFromHistoryIfWanted
logic into filemanagerutil functions.
Stay on the same page when manipulating history (previously, we were
always put back on first page).
Really keep deleted files in history (unless setting says otherwise).
Show deleted files in grey or dimmed in classic History and all
CoverBrowser display modes.