-
Notifications
You must be signed in to change notification settings - Fork 13
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
Configurable range for auto scale #136
Conversation
Scales below 1.0 are typically unuseful, so make 1.0 a minimum auto scale by default. Add configuration options for minimum and maximum auto scale, in case someone actually wants scales under 1.0 or wishes to limit the maximum scale.
I decided to make it configurable while I'm at it, and also add an optional maximum. (If I had access to multiple slightly over 200dpi displays I might well want to limit the maximum to 2.0.) There's no command-line interface for adjusting the range as that feels like a rare operation. |
Many thanks. We'll likely need max at some stage...
That's fine, it would indeed be rare. |
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.
Many thanks, love your work.
Testing:
cli / log
- shows in -g
- shows in -y -g
min
- default - when min not present scale is always set to 1
- above
- below
- bad
- 0
max
- default
- above
- below
- 0
other
- specific scale
- scaling off
- auto scaling off
- change cfg
odd
- min > max - not quite predictable
shows in -g
info.c.patch.gz assumes 0.0 as "not present".
when min not present scale is always set to 1
Could this be to do with the default values of -1.0? Floats are annoying. Options:
- use pointers to floats; problematic as you need to deal with allocating / freeing
- use 0.0f to indicate missing; if the compiler complains about comparing a float to zero we can probably suppress
- use
wl_fixed_t
to store the min/max
min > max - not quite predictable
Can we just check and reject this?
Thanks for a really good review! I'll work on these when I have time (hopefully in a couple of days) and get back to you! |
Added.
Actually this was when max wasn't set, due to accidentally using the default min value as the default max value too. Fixed.
Fixed by disabling it in this case. Give it another look with these fixes. I'll be happy to fix any further issues. |
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.
Fantastic, all working nicely:
cli / log
- shows in -g
- shows in -y -g
min
- default - when min not present scale is always set to 1 - fixed
- above
- below
- bad
- 0
max
- default
- above
- below
- bad
- 0
- 0.1 - goes to calculated
min > max
- uses min
other
- specific scale
- scaling off
- auto scaling off
- change cfg
Many thanks for your contribution! Can you wait for a release? I'd like to get #121 in as well... |
I'm in no hurry, take your time! |
Scales below 1.0 are typically unuseful, so make 1.0 a minimum auto scale by default.
Add configuration options for minimum and maximum auto scale, in case someone actually wants scales under 1.0 or wishes to limit the maximum scale.
Fixes #135.