Commit Graph

8281 Commits (de6f2e84a38c071aee0e24e3836f2c47950cf20d)
 

Author SHA1 Message Date
NiLuJe 5e3de72a5a
Bump base (#7323)
https://github.com/koreader/koreader-base/pull/1309
https://github.com/koreader/koreader-base/pull/1311
3 years ago
poire-z b5de2b2a60 Reading statistics: tweak book stats views
Make "Current statistics" and previsouly opened book
statistics display missing info that the other view
has, mostly:
- Pages read: nb (pct%)
- Current page/Total pages: num/total (pct%)
3 years ago
poire-z 8a0d798e9e KeyValuePage: configurable items per page
Tweak building to start from items per page instead of
a fixed item height.
Guess the best font size that fit.
Update separator specification from using a "----" to
the now generic separator=true (this allows not wasting
a slot for each separator in the page and not have
only 12 items and 2 small lines in a 14 items page).
3 years ago
NiLuJe 572900bfff When displaying a *date* (as opposed to a *time*), pad the hour with
blanks if necessary in order to get a consistent alignment.

Fix #7316
3 years ago
NiLuJe 588acfe31e DictQuickLookup: Properly scroll back to top when updating a
ScrollTextWidget

Despite a similar API between ScrollTextWidget and ScrollHtmlWiget, what
they do internally doesn't quite match.

So, while ScrollHtmlWidget's resetSCroll *does* rewind back to the top,
ScrollTextWidget's doesn't, it just updates the scrollbar itself.
So, do that on our end, *before* the (re-)init, which'll call
_renderText for us.

Fix #7318
3 years ago
NiLuJe e6a946a048 Menu: Enable/Disable the pagination Button properly
Otherwise, the dim state isn't updated properly, because Button trusts the state flag.

Regression since 6132e8c904

Fix #7317
3 years ago
poire-z 173d9600f0
Bookmarks dogear: fix position with CRe top status bar (#7312)
Draw it below the CRe top status bar rather than over it.
3 years ago
poire-z 00aef60e17 Goto dialog: use "Go to Page" also with CreDocuments 3 years ago
poire-z 05c8cd2155 SkimToWidget: remove title bar, add bookmark button
Remove the title bar, as it was just taking uneeded
space over the book content.
Add a middle button in the top row to toggle bookmark
for the current page.
Rework the UI building to get more consistent and
aligned buttons and progress bar.
Move SkimToWidget from apps/reader/ to ui/widgets/.
3 years ago
poire-z 0f7722d4a6 TOC settings: add bind chapter navigation/titles to ticks
Add 2 convenience settings, allowing ToC ignored depths
settings to apply further than just the progress bars.
3 years ago
poire-z d63d282806 History: avoid opening non-existent files
Mostly just so we don't get the History closed when
erroneously tapping on a deleted file.
3 years ago
NiLuJe fe10d0bce5
Revamp flash_ui handling, once more, with feeling ;) (#7262)
* Simplify flash_ui handling (by handling the unhighlight pre-callback, c.f., #7262 for more details).
* UIManager: Handle translucent window-level widgets (and those wrapped in a translucent MovableContainer) properly in setDirty directly, making sure what's *underneath* them gets repainted to avoid alpha layering glitches. (This was previously handled via localized hacks).
* Update UIManager's documentation, and format it properly for ldoc parsing, making the HTML docs more useful.
* ReaderView: Reinitialize the various page areas when opening a new document, to prevent poisoning from the previous document.
* Event: Handle nils in an event's arguments.
* CheckButton/RadioButton: Switch to simple inversion to handle highlighting
* CheckButton: Make the highlight span the inner frame's width, instead of just the text's width, if possible.
* AlphaContainer: Fix & simplify, given the UIManager alpha handling.
* MovableContainer: When translucent, cache the canvas bb used for composition.
* Avoid spurious refreshes in a few widgets using various dummy *TextWidgets in order to first compute a text height.
* KeyValuePage: Avoid floats in size computations.
3 years ago
NiLuJe 1cdc6c61e0 Strip trailing slash from the URL in About popup 3 years ago
NiLuJe f2b7a66207 Update fonts
https://github.com/koreader/koreader-fonts/pull/15
3 years ago
NiLuJe 1820c616a1
[RFC] Switch ConfigDialog's rotation toggle to custom icons (#7306) 3 years ago
NiLuJe 467264f59f
ScreenSaver: Don't expand special tokens with an empty string (#7314) 3 years ago
NiLuJe 995668ac02
Unbreak macOS build (#7313)
* Bump base

https://github.com/koreader/koreader-base/pull/1308
https://github.com/koreader/koreader-base/pull/1310

* Include bison in macOS build deps

Apparently something in gettext is possibly unhappy with the hilariously
outdated stock version (2.3).
3 years ago
poire-z 6132e8c904 Button: don't handle long-press when not enabled
It was only not handled when hold_callback. Do that
also when hold_input/hold_input_func.
Also fix the handling of HoldRelease (as the Hold may
change the state of 'enabled', so we can't rely
on it to guess the Hold is being handled by Button).
Menu: prevent long-press on "No choice available",
as there's then no page to navigate to.
3 years ago
poire-z e44c170f59 Wikipedia results: fix images not updated across results
Some results fields were forgotten by the "smarter update"
from a38881a9.
3 years ago
Rex Kerr 2510ff4847
Reversing commit 2348cd, changes to warmth values (#7296) 3 years ago
NiLuJe ac54af6505
Bump base (#7295)
https://github.com/koreader/koreader-base/pull/1307

(Umpteenth time's the charm, eh?)
3 years ago
NiLuJe d48aeea24b
Bump base (#7294)
https://github.com/koreader/koreader-base/pull/1306
3 years ago
Frans de Jonge 35ff6776a5
[fix] Remove OPDS menu entry from FilemanagerMenu (#7291)
Fixes #7290.
3 years ago
Frans de Jonge 9f2c45284b
[chore, documentation] Fix up util.stringStartsWith/stringEndsWith LDoc comments (#7292)
Cf. <https://github.com/koreader/koreader/issues/7286#issuecomment-778855817>.
3 years ago
NiLuJe 7a742a2e64
Bump base (again) (#7289)
https://github.com/koreader/koreader-base/pull/1305
3 years ago
NiLuJe 5df25f8bd6
Bump base (#7288)
https://github.com/koreader/koreader-base/pull/1301
https://github.com/koreader/koreader-base/pull/1302
https://github.com/koreader/koreader-base/pull/1304
3 years ago
Frans de Jonge 15c96a98ae
Update translations for 2021.02 (#7287) 3 years ago
Rex Kerr 2348cdb066
Improved ramp-down of warm-light after max hour (#7272)
previously: warm light stays at 100% for 3 hours and then drops by 50% per hour
now: warm light stays at 100% for 4 hours and then drops by 15% per hour
3 years ago
Rex Kerr 286a6b4883
Emulator: update mac instructions to include gnu grep (#7266)
Since `grep -z` is not available on posix grep
3 years ago
NiLuJe d8fc28df97
Page Overlap: Fix rectangle computation and arrow mode (#7269)
* In ReaderPaging, the panning step pre-PanningUpdate can be wildly overshot near page edges, so, use the corrected value instead by recomputing it after the panning has been effectively computed by ReaderView.
This fixes slight inaccuracies, as well as glaring mistakes when going backwards, or when near page edges.
This is in line with how ReaderRolling computes the value, which I only realized later because I'm an idiot. 
* Minor cleanups around the handling of the dim_area Geom object in general.

* Fix the "Arrow" page overlap mode to be painted in the right coordinates when going backward. Issue might not have been terribly clear because of the previous issue ;).
* Center the arrow's point, while we're here.
* Don't use AlphaContainer to make it translucent, because AlphaContainer is horribly broken, and has weird quirks and behavior that make no sense to me unless some very specific and unlikely constraints are met, and they definitely aren't here.
This fixes the arrow copying an arrow-sized square of the original page the book was opened on on the top-left corner of *every* page with an arrow. (lol).
* Do real proper alpha-blending via Icon/ImageWidget from the original icon, instead of faking it via addBlitFrom, in order to avoid the dimming *around* the triangle's shape.
3 years ago
poire-z b8c64845b7
bump crengine: various fixes, support CSS "visibility" (#7265)
Includes:
- Fix max img height when small line-height
- getRenderedWidths(): fix consecutive non-collapsable spaces
- CSS: adds support for "visibility: hidden"
- Text: fix some bgcolor issues, handle fgcolor transparent
- remove global gRootFontSize
3 years ago
poire-z 6059958ab6
File browser settings: reorganize into Settings submenu (#7259)
Move classic file browser settings from CoverBrowser plugin
into FileManagerMenu, so they are available when this
plugin is disabled (as they also apply to everything
based on Menu).
3 years ago
Sergey Avseyev 8e1721173e
Add OPDS server from knihi.com (belarusian) (#7263)
https://knihi.com/readers.html
3 years ago
Frans de Jonge ac668ecb64
Add a few more mimetypes for OPDS (#7258)
Doesn't include application/zip as CBZ, but it will be downloaded (as ZIP).

Doesn't include CBR since that's not supported.

Closes #7218, closes #5997.
3 years ago
NiLuJe 82f0e68118
Button: Fix some more weird highlighting corner-cases (#7256)
Namely, the Terminal plug-in and its chain of InputDialog on top of each other (via the "Save" button, which opens a whole new fs InputDialog to set the filename, while keeping the file's fs InputDialog open).
3 years ago
NiLuJe 23affc7414
Menu: Properly unhighlight menu items with a callback that doesn't do anything (#7254)
Fix #7251
3 years ago
NiLuJe 9e862e1126
TextViewer: Flag as a modal (#7255)
It's used that way in a few contexts (e.g., View HTML).

Fix #7249
3 years ago
Martín Fernández 5c9e649804
move opds to plugin (#7237) 3 years ago
poire-z c7e97ca3cb
Highlight dialog: fix 'Follow Link' button not shown (#7250)
Since 7bd59330: some checks can't be done at init(),
and have to be done at onShowHighlightMenu() time.
3 years ago
Frans de Jonge 893026a2ef
[chore] Fix a few Persian keyboard luacheck issues (#7253)
Cf. <https://github.com/koreader/koreader/pulls#issuecomment-774345230>.
3 years ago
poire-z 3b89e32069 [UX] Add ToC/Bookmarks settings
- Menu widget: allow specifying the number of items per
  page and the item font size, so we can use other values
  than the default File browser ones
- Menu: fix setDirty when a border is used
- ToC: add item per page and font size settings, make
  Alternative ToC more visible (was previously
  available on long-press on Table of contents)
- Bookmarks: add item per page, font size, size reduction
- Progress bars (Skim widget and footer): allow selecting
  ToC depths from which ticks are made.
3 years ago
poire-z 316107a1cb ReaderRolling: fix possible crash in scroll mode
When opening a document in scroll mode with an invalid
last_xpointer.
This code path was never taken before 05126b94, and it has
never been updated to pass the page number in scroll mode
(so it's provided to the footer) like it has been in other
places.
3 years ago
Monirzadeh 6f50d67b5d
[UX] Add Persian keyboard (#7222)
Fixes #5791.
3 years ago
Frans de Jonge cf3fed252a
[chore] Properly set CoverImage menu order (#7239)
Reported by @pazos in <https://github.com/koreader/koreader/pull/7237#discussion_r570395126>.
3 years ago
NiLuJe d4d5dd25ba TextViewer: Allow tweaking the region of the refresh done on close.
Use it in ReaderBookmarks to clear flash_ui highlights.

Fix #7230
3 years ago
NiLuJe b41567e0e6 ConfigDialog: Check alt_name_text if name_text isn't set,
as it is used for the "Set as default" popup.
This allows having that text accurate on widgets without an
actual name_text (e.g., the font size wheel).

Fix #7231

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
3 years ago
poire-z a43da51c4e
bump crengine: CSS and image sizing fixes and tweaks (#7235)
Includes:
- CSS: add units vw vh vmin vmax
- CSS max-height: apply to block elements
- 2-pages mode/1-page number: fix title/author alternation
- EPUB: fix segfault on missing items in opf manifest
- (Upstream) CacheFileHeader: zero the alignment padding for reproducibility
- (Upstream) CSS: parse_number_value(): round to nearest
- getStyledImageSize(): tweak min/max-width/height computations
- getStyledImageSize(): don't ignore FB2/SVG <image> element
- getStyledImageSize(): hack to handle sizing via SVG wrappers
3 years ago
NiLuJe 285fc75aa7
Button: Better handling of translucent MovableContainer (#7223)
* DictQuickLookup: Preserve alpha when switching dict, and scrolling
inside a dict.

* Start moving the NumberPicker alpha hack to Button itself

This makes handling flash_ui easier and saner, avoiding flickering.

* Handle the transparency hack entirely from within Button

* Murder the now unnecessary NumberPicker update_callback hack

* Tweak comments

* And the Button handling made that redundant, too

* Squish debug print

* More comment tweaks

* Reset transparency on scrolling instead of rpeserving it

* Reset alpha when switching dictionaries

* Simplify the pre/post callbakc transparency state handling

And explain why we need to care.

* Give a named reference to ButtonDialog's MovableContainer, so the Button
alpha hack behaves with it

* Document the "self.movable" convention

* Amend that comment a bit

e.g., we don't care much about MultiConfirmBox'w MpvableContainer, as
any button action will close it.

* And make SkimTo's MovableContainer accessible so that Button can grok
that it's translucent
3 years ago
Martín Fernández 4a89c93290
Remarkable1 wifi (#7216)
* add wifi support to Rm1
* remarkable: common suspend for all models
3 years ago
poire-z 68a5fcdbc1 Notifications: stack them instead of overdrawing them 3 years ago