Skip to content

SkimTo dialog: compact mode#12046

Merged
hius07 merged 10 commits into
koreader:masterfrom
hius07:skim-to
Jun 22, 2024
Merged

SkimTo dialog: compact mode#12046
hius07 merged 10 commits into
koreader:masterfrom
hius07:skim-to

Conversation

@hius07

@hius07 hius07 commented Jun 18, 2024

Copy link
Copy Markdown
Member

(1) Compact mode, taken from the userpatches in #11486.
(2) Full mode: long-press on the page number jumps to the start page.
(3) New boookmark symbols.

1

2

3

4

5


This change is Reviewable

@hius07

hius07 commented Jun 18, 2024

Copy link
Copy Markdown
Member Author

@offset-torque, there are mistakes in https://koreader.rocks/user_guide/#skimwidget.
Long-pressing on Previous/Next chapter button jumps to the first/last page of the book.

New: long-pressing on the page number jumps to the start page (the page we have opened the SkimWidget at).


self.buttons_layout = {}
-- nil for default center full mode; "top" and "bottom" for compact mode
local skim_dialog_position = G_reader_settings:readSetting("skim_dialog_position")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you later use this as a flag/booleante, it's a bit odd to read.
You could use local compact_mode = skim_dialog_position ~= nil and if compact_mode then in the many places below.

Comment thread frontend/ui/widget/skimtowidget.lua Outdated
}
local button_orig_page = Button:new{
text = "\u{21BA}", -- Anticlockwise Open Circle Arrow
--text = "\u{21A9}", -- Leftwards Arrow with Hook

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If keeping that, add a space after -- .)

@offset-torque

Copy link
Copy Markdown

Noted. I will fix that and add the new feature. Is the use case something like this: "User opens skim widget, jumps to some random parts of the book to have a look and long press page number to go back where he is."

@Commodore64user

Commodore64user commented Jun 18, 2024

Copy link
Copy Markdown
Member

Not sure if this has been fixed here, but the patch on NT is kinda wonky. The order of the buttons does not match the iteration (visuals on screen), so difficult to navigate. You have to guess what comes next.

One more thing, it is my humble opinion that the contents of "physical buttons" could just populate the current menu without needing to be hidden under a submenu. There are, at most three things displayed at once there so... or putting all the "back" stuff into a sub menu of their own.

@jonnyl2

jonnyl2 commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

Thanks for updating the skimming widget.

One thing that makes it a little impractical for fixed-layout docs is that when page view is set to show only parts of a page (e.g. zoom, fit-to-with, reflow), the skim widget will only show the first part of each page when skimming. I would therefore suggest that for fixed-layout docs, zoom is changed to full page and reflow turned off while the widget is active. And upon closing, revert to previous settings. (As page flipping mode does, too.)

@jonnyl2

jonnyl2 commented Jun 20, 2024

Copy link
Copy Markdown
Contributor

Thank you @hius07 for page view 👍.

It would be nice if when the widget is closed on the same page where launched, it would exit back to the same position on the page (rather than to the top of the page). But if that's not an easy fix, no problem.

@hius07

hius07 commented Jun 20, 2024

Copy link
Copy Markdown
Member Author

It would be nice if when the widget is closed on the same page where launched, it would exit back to the same position on the page (rather than to the top of the page).

Can you test it? (I am not a heavy user of pdf files)
readerpaging.lua.txt

@jonnyl2

jonnyl2 commented Jun 20, 2024

Copy link
Copy Markdown
Contributor

It works great, thank you!

@hius07 hius07 merged commit a1ae53c into koreader:master Jun 22, 2024
@hius07 hius07 deleted the skim-to branch June 22, 2024 14:57
Commodore64user pushed a commit to Commodore64user/KOReader_fork that referenced this pull request Aug 2, 2024
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants