-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ensure minimum height for the in-fill in progress bar #6878
Conversation
margin_v_orig = nil, | ||
bordersize_orig = nil, |
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.
These seem to be for internal purposes only.
Sounds good. "Some screen sizes" is very vague though. What kind of screen sizes? :-) |
* margin_v_orig -- margin_v before adjusting | ||
* bordersize_orig -- bordersize before adjusting |
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.
If there are just internal variables, and they shouldn't ever need to be provided by caller, may be don't document them here.
And name them _orig_margin_v
, with a leading underscore as a kind of convention these are private.
I don't know, whatever causes |
@@ -660,7 +660,7 @@ function ReaderFooter:resetLayout(force_reset) | |||
else | |||
bar_height = self.settings.progress_style_thick_height or PROGRESS_BAR_STYLE_THICK_DEFAULT_HEIGHT | |||
end | |||
self.progress_bar.height = Screen:scaleBySize(bar_height) | |||
self.progress_bar:setHeight(bar_height) |
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.
There's another instance of this @ L1836
(Which I'm not quite sure is actually necessary at all, because it has nothing whatsoever to do with what that function's supposed to do... It feels like a leftover from a c/p from this resetLayout
, actually)
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 thought I had searched for other instances, obviously I missed at least one.
Some stuff was still hacked on manually instead of trusting the widget system to do things right, which it does, if you update the right stuff at the right time the right way ;). *This Is The Way*. Fix #6893 (and address #6878 (comment), because it was indeed redundant ^^). Includes a bonus fix for a number of (footer) settings not being applied immediately in PDFs.
With some screen sizes, the footer progress bar (in thick style) may be empty, because margins and borders take the full height. This should ensure that does not happen, by reserving at least 1 pixel for the actual progress bar.
Left: before the PR. Right: after
![Screenshot_20201114_115723](https://user-images.githubusercontent.com/7943459/99145819-15df1200-2672-11eb-8853-560ada690eb7.png)
with
./kodev run -h=720 -w=1024
, for sizes 5 to 9 (which get scaled to 6 to 10, and the default border and margin are scaled to 2)This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)