* 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
* Avoid the Lua string copies when compressing/uncompressing the bb
thumbs
* Delay the statement reset so that the pointer returned by the BLOB
query is actually usable ;).
* Re-use a ZSTD decompression context
* Store date & mtime for successfully extracted documents
c.f., 10477501f9 (r44914917)
* Switch to user_version pragma to handle DB schema versioning
* Update file size/date on *each* extraction attempt.
@poirez-z raised a good point, this ought to be useful to deem a file
re-parseable after an update.
* Remove xutil
Functionality has been moved to ffi/zlib & ffi/zstd
* Preserve settings when migrating the BookInfo DB
* Warn via InfoMessage that the DB was updated
* Only store the series name in series, and move the index in series_index
(Column names chosen to match Calibre's).
* Handle the new series_index column in BookInfo consumers
* This allows us to get rid of the code that stripped empty decimals
from series index in *most* places, since it's now a real Lua
number, and the string formatting library does that magic on its
own.
* 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 ;).
This way we still get the passed/expected actual values in Busted's
output
Which helps not make this any more maddening than it already is to
update...
* 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.
FileManager:init is called by FileManager:reinit, which caused duplicate
loads. Those can't be useful, (for example to re-load a modified plugin
on runtime), as PluginLoader:loadPlugins memoizes loaded plugins.
* 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.
nextTick was too early ;).
Prevents small hitches when turning the page for the page where this
triggers.
Apply the same trickery to the Stats DB insert, even if that one probably
had a much smaller impact.
* Warn on restart if the startup script has been updated, because a restart will not reload it.
* Also warn right after the update if it contained a startup script update...
- 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
Some stuff was still hacked on manually instead of trusting the widget system to do things right, which it does, if you update the right stuff at the right time the right way ;). *This Is The Way*.
Fix#6893 (and address https://github.com/koreader/koreader/pull/6878#discussion_r523411883, because it was indeed redundant ^^).
Includes a bonus fix for a number of (footer) settings not being applied immediately in PDFs.
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.