-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
PDF contrast: incorrect set by a gesture #10798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(1) The item is called "Contrast" in the bottom menu and in the Taps and gestures menu. Notification shows "Font gamma set to" message. Should it be changed to "Contrast"? (2) Do we need the more_options (3) If not (2), do we need the SpinWidget in the Taps and gestures actions menu? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Yes
Is that just about PDF ? And I think this contrast/gamma in CRE should not apply to images. I sometimes miss another setting that would apply to images that could make grey text in images more readable :) I'm usually annoyed when I need more contrast in PDF for text, and it make all images nearly black... but I guess we can't distinguish text from images in PDF. |
Yes, this PR is about pdf only.
cre shows the same:
|
For cre we have the vice versa inconsistency: the bottom menu has more_options |
frontend/ui/data/koptoptions.lua
Outdated
-- See https://github.com/koreader/koreader/issues/1299#issuecomment-65183895 | ||
-- For pdf reflowing mode (kopt_contrast): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would very much keep those comments around ;).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With an addendum that the div was moved to KoptInterface ;).
koreader/frontend/ui/data/koptoptions.lua Line 375 in 0db7509
What is optimized by calling a function instead of return configurable.text_wrap == 1 ?
|
Dunno, maybe nothing - it seems a remnant from some old PR where the author decided to have other such functions to maybe make things more readable? #1455. |
I think the answer to most such questions would be clarity and/or maintainability? :-) |
So, let's keep it? |
Do as you prefer :) |
I basically mean greppability. It looks to me like NB I'm not saying I'd have written it the same way or that I'm opposed to changing it; I barely know what the context is here. It's been at least a couple of years since I last dove into this code. I'm just speaking generically about code/maintenance patterns. |
Update: make pdf Contrast consistent to cre Contrast ( |
I believe the bug should be fixed. |
Looks ok to me. @yparitcher : ok for you ? |
Does this work if the user has a gesture/profile saved with the old values? |
Old setting will become new setting koreader/frontend/apps/reader/modules/readerview.lua Lines 863 to 866 in 5f336a7
And old calls
koreader/frontend/document/koptinterface.lua Line 147 in ed2ea68
will become new calls
koreader/frontend/document/koptinterface.lua Line 148 in 5f336a7
Following #1299 (comment), instead of saving 2 values for non-reflow and reflow modes (gamma and 1/gamma), we now save only one value, and in reflow mode use 1/value as argument to setContrast .
|
Does the config value need to be updated Also what about gestures that store call the gamma event directly? |
No, because option values are changed too. koreader/frontend/ui/data/koptoptions.lua Line 486 in ed2ea68
After: koreader/frontend/ui/data/koptoptions.lua Line 486 in 5f336a7
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now.
Sorry for being slow today :)
Closes #10795.
This change is