Commit Graph

2117 Commits (master)

Author SHA1 Message Date
hius07 5414858b74
Menu widget: fix item property name (#11534) 3 months ago
poire-z 9467034f3f ReaderTypeset: tweak Style> menu logic and defaults
- Reword and document most menu items.
- Handle internally two default styles, one applying only
  to FB2/FB2 books, and the other to all other formats.
- Also don't reset the stylesheet to epub.css when
  toggling Embedded Styles to off.
3 months ago
hius07 6f896e9383
ReaderFooter: chapter progress bar (#11505) 3 months ago
hius07 bdb1c3135c
Fulltext search: default mode, fixes (#11507) 3 months ago
hius07 8df885438c
Bookmarks: edit highlighted text (#11484) 3 months ago
zwim 58b3367d18 anti alias rounded corners in UI 3 months ago
hius07 7edb64ecee
Upper menu: fix generating the menu (#11513)
revert all changes to the upper menu made in #11495
3 months ago
hius07 ec98c6334b
MenuSearch: open upper menu when needed only (#11495) 3 months ago
hius07 72a6fa1e64
FileManager: less lfs calls when selecting files (#11476) 3 months ago
hius07 db2336440f
Alt status bar: custom metadata support (#11463) 3 months ago
hugleo 52fae11da7
ReaderView: ensure pan zoom mode on document open (#11425)
When we open the document for the first time, the pan
positions are not being applied. If I use the bottom-to-top
mode we should see the bottom first, but the top is being
shown instead.
4 months ago
hugleo ef0077df23
ReaderPaging: fix offset issue on next page in pan zoom (#11408) 4 months ago
hugleo 041117cbb6
ReaderZooming: revert Autocrop fix (#11325)
From f990937f9f.
4 months ago
hius07 5d4747c593
FileManager: less lfs calls (#11452)
Use item info provided by FileChooser.
Also fix showing PathChooser with invalid path,
and fix issue when opening non-supported files.
4 months ago
poire-z d77b511849 bump crengine: text selection and footnotes fixes and tweaks
Includes:
- LvDocView: allow setting custom title/authors/series
- elementFromPoint(): fix possible crash when float at end of document
- Non-linear fragments: fix generic handling on erm_final
- DrawBorder: fix bottom border inset/outset drawing
- getSegmentRects(): allow segments to include images
- getRangeText(): allow gathering images
- Allow standalone image in link to trigger in-page footnotes
- ldomDocument::render(): avoid uneeded deserialization on each page turn
- lvtinydom: add ldomNode::getAllInnerAttributeValues()
- LVFootNote: avoid retrieving internal CompactArray object
- In-page footnotes: allows for multiple id= inside them

cre.cpp:
- rename overrideDocumentProp() to setAltDocumentProp()
- isLinkToFootnote(): handle image-only links
- text selection functions: add includeImages param
4 months ago
Frans de Jonge bdd475f55f
[i18n] ReaderSearch: add translation context to "All" button (#11352)
Cf. https://github.com/koreader/koreader/pull/11313/files#r1439406753
4 months ago
hius07 b8090c641c
Minimize DocSettings:open() calls (#11437) 4 months ago
hius07 d94b819eb1
CoverBrowser: use bookinfo cache in Classic mode (#11404)
Getting bookinfo from the cache db is much faster than opening a book, let's use it in Classic mode too.

With fallback if no metadata available.
4 months ago
hius07 925aa728c9
Fulltext search: action to show last findall results (#11388) 4 months ago
NiLuJe 19ed35e59c ConfigDialog: Don't enforce 0x0 dimensions on initial display
FrameContainer now behaves like other widgets, and no longer re-computes
dimensions in paintTo *if you provide a dimen*.
Since we do here, for.... reasons I'm not entirely sure still make any
sense, make sure we actually compute valid dimensions,
instead of an empty rect from Geom:new ;).

Fix #11389
4 months ago
NiLuJe 90ae4acca6 Chore: Review FrameContainer constructors for shared dimen objects
Nothing else seems problematic, this is mostly just cosmetic sanitization
around Geom objects.
4 months ago
poire-z 43d36b2ea9 TextBoxWidget: allow showing bits of text in bold
Allow for embedding "tags" (invalid Unicode codepoints)
in the text string to trigger some text formatting:
for now only bolding some parts of text is possible.

Use it with fulltext search "all results" to highlight the
matched word (instead of the previously used brackets).
4 months ago
poire-z 487e5f667a ReaderThumbnail: prevent standby during thumbnails generation
PageBrowser could have strange issues on devices with
aggressive autostandby (ie. failure to read data
from subprocess).
4 months ago
hius07 43831236ce
CoverBrowser: doc_settings cache improvement (#11360) 5 months ago
NiLuJe 5bd78ab3b4 ReaderHighlight: Don't try to close a non-existent widget in onClose 5 months ago
NiLuJe d205c72119 ReaderStatus: Fix some more lifecycle issues in onEndOfBook
Delay anything that attempts to destroy the current document instance if
we're inside an event handler.

Re: https://github.com/koreader/koreader/issues/11147#issuecomment-1891005869
5 months ago
hius07 c4e9e6bc51
filemanagermenu: fix classic mode items per page (#11346) 5 months ago
hius07 0ceb88a9a3
Fulltext search: all entries in entire document (#11313) 5 months ago
poire-z a025faae4e Text selection: show top left icon when very-long-press delay reached 5 months ago
poire-z 455e904120 Text selection: add option to disable corner scroll
People using 2-steps text selection (via the Select button) may
want to not be annoyed by this feature.
Also tweak a bit its behaviour, requiring now the text selection
to come from outside a corder into a corner to activate it, which
should allow starting text selection from a corner without
triggering a scroll yet.
5 months ago
NiLuJe 8968c41070 i18n: Some more unicode escapes => raw bytes shenanigans
Fix #11332
5 months ago
zwim 2c33fc6576
Reader: Do less work on same-orientation non-gyro rotations (#11297)
Namely, don't recompute layouts, as they do not change.
(The gyro codepaths were already doing something similar.)

* Keep ConfigDialog, FileManagerMenu & ReaderMenu open on rotation.
  (In practice, only ConfigDialog is affected, as *Menu doesn't handle the rotation event.)
* Plugged an instance leak in the aforementioned Menu classes.
* Unify behavior & code with the gyro codepaths.
5 months ago
hius07 ea9ef6781c
CoverBrowser: adjustable mosaic grid (#11232) 5 months ago
hius07 3533356ffd
filemanagerhistory: fix untranslated strings (#11282) 5 months ago
hius07 7a421ea3ab
Fix "Open next file" (#11272) 5 months ago
hius07 b949d07f4f
filemanagerbookinfo: proper text_type of description (#11260) 5 months ago
hius07 5a4e70a19d
History, Collection: title bar in FM style (#11243)
These changes make the title bar in File manager, History and Collection windows of the same height.
The items and book covers thumbnail dimensions in Mosaic and Detailed list display modes are now equal, and up/down scaling of the thumbnails is not needed when switching between File manager, History and Collection.
5 months ago
hius07 bf59f53e18
Folder shortcuts: speed up (#11221) 6 months ago
hius07 f765fe3070
Screenshot: set as book custom cover (#11227) 6 months ago
hius07 f4a5a2b60a
TextViewer: add dialog to set font size and justify text (#11210) 6 months ago
hius07 aabd6d7a26
File browser, Collection: improve group actions (#11178)
Maintain correct records in History and Favorites when moving/deleting folders or group of files.
Optimize Collection module to minimize storage requests.
6 months ago
Wim de With e7780c09f3 fixup! Process directory list items for mixed collation 6 months ago
Wim de With 128accafe3 fixup! Process directory list items for mixed collation 6 months ago
Wim de With 98d92d37ab Refactor FileManager collation for easier patching 6 months ago
hugleo f990937f9f
Autocrop fix (#11194)
After some tests with the said document from https://github.com/koreader/koreader/issues/970 it seems like that the visual defect occurs for only semi-auto and manual crop modes.

I've removed auto-crop from the rule so fixes https://github.com/koreader/koreader/issues/4106 when using auto-crop.
6 months ago
poire-z b361cec4ff ReaderStyleTweak: minor CSS suggestions popup fixes 6 months ago
hius07 b4424b4685
filemanagerhistory: fix non standard status (#11188) 6 months ago
hius07 d3787eee64
filemanagershortcuts: fix menu (#11167) 6 months ago
NiLuJe 82e7ebd6df
ReaderView: Flash when paging *away* from images, too (#11152)
Reword the `Always flash around pages with images` Menu/Dispatcher entry
accordingly.

Fix #11143
6 months ago
hius07 d99c70b5e1
ReaderHighlight: adjustable highlight dialog position (#11116) 6 months ago
hius07 88d6613fed
Folder shortcuts: new markers, buttons (#11108)
Buttons to add/remove folder shortcut from Plus menu and from folder popup dialog.
A marker ("empty star") for folders with shortcuts.
7 months ago
hius07 da8e23c011
InputDialog: tap outside to close dialog if keyboard is hidden (#11094) 7 months ago
hius07 082ef9b545
FileChooser: fix reverse sorting of folders (#11093)
Do not apply "reverse sorting" to folders in sorting modes "type", "size", "percentage".
In that modes folders are sorted by name.
7 months ago
poire-z 894cb3190d
Page browser: show nightmode thumbnails when in nightmode (#11091)
Just prevent page thumbnails ImageWidgets to be nightmode
inverted, unlike all other ones which are expected to be
double inverted to get their original colors shown.
The same thumbnail can be used and cached in both day and
night modes, unless "nightmode_images" is enabled and have
crengine itself invert images, making thumbnails different.
7 months ago
hius07 4044c81a5a
History: update on deleting a folder (#11090) 7 months ago
hius07 d0d3cf78f9
History: search (#11084) 7 months ago
hius07 51f3115b90
Profiles: fix updating gestures (#11072) 7 months ago
hius07 68aa209a6c
Open with... improvement (#11056)
Allows associating filetypes with non-document providers (like ImageViewer or TextViewer) to "open" (view) these files by a tap in file browser.
7 months ago
hius07 b70f866656
DocSettings (again) (#11020)
Cleaning and optimizing Docsettings code.
7 months ago
hius07 6b892a65a3
ReaderHighlight: delete highlight in view note dialog (#11039) 7 months ago
hius07 39d54956ec
webdav: do not allow trailing slash in start folder (#11026) 7 months ago
hius07 3b2fc7a551
Reader: re-enable File search, Folder shortcuts (#11028) 7 months ago
hius07 2ed2c2c23d
md5: centralize and deduplicate (#11003)
Document partial md5 hash is calculated by util.partialMD5() and stored in doc_settings as "partial_md5_checksum" on the first document opening.
8 months ago
hius07 6ccf19b99f
History: update on renaming/moving a folder (#10999) 8 months ago
François Gannaz 11083022b0
Minor code quality improvements (#10905) 8 months ago
hius07 e577c79d95
File search, FileChooser and others (#10994) 8 months ago
hius07 517731dbbb
Finished books: freeze history timestamp and statistics (#10968) 8 months ago
poire-z ea3f8951a3 Add ReaderHandmade: support for custom TOC and hidden flows
Checkboxes under TOC>Settings> allow enabling Custom TOC
and Custom hidden flows (similar to "Hide non-linear fragments"
available with some EPUBs).
Handled by a new ReaderHandmade module.
Adding and removing TOC chapters is done in PageBrowser
with long-press on a page thumbnail, and for chapters also
in the popup dialog after selecting some text in a page.

ReaderToc: add a symbol in title when the TOC is the
alternative TOC or the custom TOC.
8 months ago
poire-z c51b0c7bb9 BookMap: add option Alternative theme
When enabled in BookMap, both BookMap and PageBrowser get:
- alternating gray background on chapter spans
- hatched background instead of uni-gray on hidden flows.
Also, with both normal look and this alternative theme,
show some hatched overlay on thumbnails part of hidden flows.

ReaderToc: for each TOC item, have it carry its sequence/number
in that level (we do this in validateAndFixToc() where we are
already iterating all the items).
8 months ago
poire-z 35f16f87a4 ReaderThumbnail: fix slow thumbnails when in scroll mode
If originally with two-columns in page mode, and switching
to scroll mode, thumbnails generation would be slow as
the document would be rerendered for each thumbnail.
8 months ago
poire-z 5ec736ae96 ReaderToc: rework getChapterPageCount/Left/Done()
Rework the way they are computed, fixing issues with hidden
flows when they don't coincide with chapter starts.
8 months ago
poire-z e6ac74c1df ReaderPaging: use document:getNext/PrevPage()
instead of doing arithmetic (ie. new_page=cur_page+1).
This makes it ready to work with custom hidden flows
where these document:getNextPage()/getPrevPage() will
be overloaded to skip pages in hidden flows.

Also fix some odd issues (page truncated or with parts
duplicated) with scrolling/page turning when at start
or end of the document.
8 months ago
François Gannaz 128302873d
New menu option and filemanager filter to hide finished books #7158 (#10895)
* New menu option and filemanager filter to hide finished books #7158

The default behavior is to display the finished books (no change on
upgrade). For consistency with the two similar options, it represented
by a checkbox "Show hidden books" that is checked by default.

The implementation is straightforward, meaning that, when the option is
unchecked, each file will require a call to `filemanagerutil.getStatus`
that checks its status.

For clarity, the code uses the "finished books" expression because the
condition is relevant to the *book* metadata, while the other settings
are about *file* attributes.
8 months ago
Benoit Pierre 5b5b4d9ebc
readerhighlight: fix OCRed text dictionary lookups (#10967)
Cf. #10966.
8 months ago
hius07 0ac258fcb7
Coverbrowser: event for cache refreshing (#10956) 8 months ago
hius07 40e2a838ae
Status: setting status of current book in History and Collections (#10946) 8 months ago
NiLuJe e5535a3a3a
ReaderRolling: Guard against races between scheduled tasks and CloseDocument (#10934)
Fix #10932

---------

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
8 months ago
hius07 9f39614e8a
Custom metadata: fixes 2 (#10919) 8 months ago
hius07 ed5c1cef20
ButtonTable: remove unused (#10926) 8 months ago
hius07 684fc22ffc
TextViewer: font size (#10911) 9 months ago
hius07 be125af949
Actions for Go to first/last bookmark (#10899) 9 months ago
hius07 3f677a7fdd
copt/kopt options: deduplicate some defaults (#10893) 9 months ago
hius07 108d87742a
Custom metadata: fixes (#10889) 9 months ago
hius07 cc82ead981
copt deduplicate: font settings (#10885) 9 months ago
hius07 6efcf96b75
copt deduplicate: font_size, visible_pages (#10882) 9 months ago
hius07 7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 9 months ago
hius07 73378cd9d7
copt deduplicate: line_spacing (#10768) 9 months ago
hius07 5e74f29fba
copt deduplicate: embedded_css, embedded_fonts (#10876) 9 months ago
hius07 e4ba8c7909
Custom metadata: event (#10869) 9 months ago
hius07 f46f341b9b
Reset settings/cover/metadata separately (#10866) 9 months ago
hius07 912ae156f7
copt deduplicate: smooth_scaling, nightmode_images (#10801)
Main discussion in #10763.
9 months ago
hius07 a767ad44db
PDF contrast: incorrect set by a gesture (#10798) 9 months ago
NiLuJe 4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
9 months ago
hius07 ed2ea6803f
Custom metadata (#10861) 9 months ago
hius07 1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
9 months ago
NiLuJe a736a3ebe0
Calibre: Add reading status to the metadata search popups (#10842)
We're getting old, remembering whether you've actually read stuff is hard ;).
9 months ago
hius07 33467098dd
filemanager: minor tweaks (#10821) 10 months ago
NiLuJe 7e628958b6 Misc: review pass for #10803 10 months ago
NiLuJe a15fc0e9a5 Revert "Test: Fiw readerhighlight test"
This reverts commit c23c422f62.
10 months ago
NiLuJe ae7e2f14aa Test: Fiw readerhighlight test
With actual ReaderUI teardowns, and fix the overlapping highlight
handling, so we can drop the nocov flags
10 months ago