* Don't try to expand a screensaver message without any special tokens
* Don't needlessly nil the background when show_message is true
Honor the actual nil background setting, now that we've got one.
Also, only clear covers_fullscreen with no background *and* no widget.
* Support special tokens outside of ReaderUI. Because the undocumented
"Oops, I'll use the fallback otherwise" was extremely not
user-friendly.
If you're *extremely* unlucky, the scheduled check might run *right*
after a wakeup, before the network interface is up. So, you have a
previously stored packet count, but the new one is nil. Boom.
By having the same DoubleSpinWidget launched when
hitting "..." on any of Top margin or Bottom margin
progress bars.
DoubleSpinWidget: remove blank space when no info_text.
Add UIManager:discardEvents(), to allow dropping events
for a period of time.
Default duration of 600ms on eInk, 300ms otherwise.
Used when showing the dict result window, so that a tap
happening just when it's being shown won't discard it.
Used with Trapper:confirm()/:info(), to avoid taps made
in a previous processing to dismiss (and so, select the
cancel action) a ConfirmBox not yet painted/visible.
Don't cleanup input text as much when entered manually
(or when it's sane) than when coming from book text
selection.
This may allow looking up words like "-suffix", or
do more precise Wikipedia queries.
- Rework widget layout to avoid implicit (and wrong)
sizing, using proper padding/margins and correct
measurements of components.
- Adjust lookup word font size so it's not smaller
than the definition.
- Tweak small window positionning: keep it centered
if possible, only move it to keep the highlighted
word shown when we can.
- Large window: adjust to screen size correctly,
leaving room for footer.
- Always have a "Close" button at bottom right.
Former always displayed button "Follow link" will
be added as a 3rd row in the rare case we select
a word in a link.
- Replace "tap on lookup word to edit and redo the
query" with an icon on the right: tap on it to
edit the queries word, long-press to edit the
current result word. Only close the current dict
window when lookup is launched.
- Remove feature "tap on title to set current dict
as the default dict for this document", as it didn't
really work, and it was bad UX.
- InfoMessage: add an option show_delay.
- MovableContainer: avoid possible crash when
not yet painted.
- ReaderDictionary: use show_delay=0.5 instead of
scheduleIn(0.5n...) (a5b133da) as we need the
InfoWidget to be known to UIManager to catch tap
and allow interrupting lookups properly.
- ReaderDictionary: rework handling of no_refresh_on_close
(6162c287) with proper regions comparisons
* Modernize jit syntax
It's built-in, no need for a require anymore.
* Flag Android should_restrict_JIT again
It's mildly helpful at putting off the inevitable.
(very, very, very, very mildly).
* Bump android-luajit-launcher
https://github.com/koreader/android-luajit-launcher/pull/281
* Don't paint invisible background-colored rounded corners
Made obvious when testing #7042
* Only enforce a highlight radius on buttons that don't already set a
custom one ;).
(Mostly, square buttons with a 0 radius ^^).
ffi/blitbuffer already handles radius being nil, which suits us just fine
:)
* Implement proper alpha-blending of SVG icons
Also, instead of doing that every time, cache a pre-composited version
that matches the screen's BB type.
This is faster, and also has the advantage of making icon highlights
behave.
Jot down a few notes about corner-cases or future improvements, e.g.,
dimming icons on non-white backgrounds, and nightmode with color icons.
- Add IconWidget, use it for icons instead of ImageWidget.
Specify icons by name only, look for them (with either
.svg or .png suffixes) in multiple directories (including
koreader/settings/icons/ to allow customizing them).
Don't crash when icon name not found, shown a black
background warning icon instead.
- Don't trust the icons' native sizes: replace
scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
so all icons get the same (tunable) size - except in
a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
properly centered in them, extend vertical line
separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
* stride is now a size_t
On some platforms, that's 64 bits, which means it's no longer
automatically converted to a Lua number to avoid precision loss.
Do that ourselves, because lua-serialize doesn't know how to handle an
uint64_t cdata ;).
* Make switching *back* to the default DPI via auto actually work
properly.
eg., by actually setting DPI back to defaults, and clearing the override
flag.
* Bump base to pickup https://github.com/koreader/koreader-base/pull/1258
* ReaderFooter:
* Honor the global twelve_hour_clock setting, instead of
duplicating a local one.
(Re #6969)
* os.date is a thin wrapper around strftime, so we might be able to get
away with some not-quite-standard extensions...
These are *definitely* supported on Linux, but are *NOT* the glibc
extension (that'd be e.g., %-I), so, hopefully, they're somewhat
portable...
They are also supported on BSD/macOS.
They are *not* supported by the MS UCRT. That means MinGW-w64, too.
This *appears* to be supported on current Bionic (it might even support
said glibc format altering extensions).
* And of course, Windows is terrible, so, make this terribly ugly to not
break it there...
* Turns out BSD also supports the dash trim format extension, so, leave
the trimming to the libc, and handle the special-casing in a way that
doesn't create stupid locals.
* Random unrelated cleanup ^^.
(https://gitter.im/koreader/koreader?at=5fd24be492aa1c4ef5d11f31)
* Update the testsuite
(Because the default used to be 24h clock).
Changed the default to 24h clock ;p.
* Explain why we don't try to fix it in Lua
Avoid crash with RTL UI after options we moved.
Swap Zoom direction items when RTL UI.
Also don't check show_func when sizing the names
on the bottom menu, to avoid icons moving or
resizing when toggling options.
* ReaderDictionary: Don't refresh when dimissing the lookup info
InfoMessage
Re #6932
* Fix dict_largewindow in Landscape
Have to leave some room for the UI chrome
* Top menu & bottom menu tapzones are now full-width, thanks to the now sane override system.
* A separate, extra tapzone was also created for each of them to provide a taller, but narrower tapzone extension (one that doesn't clash with the prev/next tapzones).
* The footer tapzone was made much taller.
Change the text in the button from a hypen (-) to a
Unicode minus size (−, U+2212). This is the same width
as the + sign.
The NaturalLightWidget and FrontLightWidget controls
already use minus signs in this way.
- Move zoom options from top menu to bottom config
- Add option to manually define zoom (relative to
page width) and overlap (in percent)
- Add options to zoom to columns or rows, possibly
with overlap. Add panning direction options when
page forward in these modes
By essentially dropping the whole XHTML block, instead of trying to salvage each and every tag one by one as we did before.
Also, as that's usually the result after broken parsing, handle nil URLs slightly better in the frontend, so that they get caught/reported properly instead of doing nothing and/or crashing half the time.
Add option to hide (skip) non-linear fragments, only working
in 1-page mode. Tweaks mostly to footer, toc and skim code
to make it clear(er) which pages belong to linear or non-linear
fragments.
* Don't attempt to restart Nickel when asking for a reboot/shutdown
Use a magic exit code to ID those cases.
* Limit this to Kobo, to avoid breaking potentially existing assumptions
with other platform's startup scripts