Skip to content

Dispatcher: prettify action list#12133

Merged
hius07 merged 4 commits into
koreader:masterfrom
hius07:dispatcher-tidy
Jul 6, 2024
Merged

Dispatcher: prettify action list#12133
hius07 merged 4 commits into
koreader:masterfrom
hius07:dispatcher-tidy

Conversation

@hius07

@hius07 hius07 commented Jul 3, 2024

Copy link
Copy Markdown
Member

(1) New "Use gesture distance" button instead of "When set to 0, the gesture's distance (if any) is used" help text.

(2) Show units in SpinWidgets.

(3) Do not show defaults in SpinWidgets.

(4) koptoptions text and values fixes.

(5) Code tidying.

1

2


This change is Reviewable

@yparitcher

Copy link
Copy Markdown
Member

Did not test, but the code looks good, i like the setValue() extraction. If it does what it says, ty.
I believe i was passing the default to the spin widget to start on a sane number, for example the current font size instead of 1, does this change that behavior?

@hius07

hius07 commented Jul 4, 2024

Copy link
Copy Markdown
Member Author

Thanks!
No changes here: SpinWidget starts with the current value, or default value, or min value.

local items = SpinWidget:new{
value = location[settings] ~= nil and location[settings][k] or settingsList[k].default or settingsList[k].min,

The default value is taken from the options:
if settingsList[name].default == nil then
settingsList[name].default = option.default_value
end

Comment thread frontend/dispatcher.lua Outdated
Comment thread frontend/dispatcher.lua Outdated

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm besides the two suggestions I left

@hius07

hius07 commented Jul 4, 2024

Copy link
Copy Markdown
Member Author

besides the two suggestions I left

Look at the second screenshot please.

@Frenzie

Frenzie commented Jul 4, 2024

Copy link
Copy Markdown
Member

Look at the second screenshot please.

Those others also shouldn't be that way; I don't know how that happened. I think they were once automatically taken from the bottom menu rather than manually put in perhaps?

@hius07

hius07 commented Jul 4, 2024

Copy link
Copy Markdown
Member Author

Yes, they are taken from copt and kopt options (bottom menu).

@Frenzie

Frenzie commented Jul 4, 2024

Copy link
Copy Markdown
Member

Right, but I meant programmatically. They shouldn't keep the form they have in a different context if they're manual. I think we once allowed it because it was fully automated? Or otherwise I somehow just missed it. ^_^

@Frenzie

Frenzie commented Jul 4, 2024

Copy link
Copy Markdown
Member

You don't even need to jump between different menus to see how the inconsistency stands out.
image

hius07 and others added 2 commits July 4, 2024 12:13
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
@hius07 hius07 merged commit 4d50787 into koreader:master Jul 6, 2024
@hius07 hius07 deleted the dispatcher-tidy branch July 6, 2024 12:23
@hius07 hius07 added this to the 2024.07 milestone Jul 6, 2024
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.

4 participants