diff options
author | Colomban Wendling <[email protected]> | 2024-05-21 10:51:37 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-21 10:51:37 +0200 |
commit | a3def4737c267b649194fd8c2f37cc8fa0f2bc0d (patch) | |
tree | fb9741e3151e05b834afbb7d49b92e6d079255dd /distro/archlinux/mate-screensaver.pam | |
parent | 72827148e15294308c20c06d3a5b9654d8b24a7f (diff) | |
download | mate-screensaver-a3def4737c267b649194fd8c2f37cc8fa0f2bc0d.tar.bz2 mate-screensaver-a3def4737c267b649194fd8c2f37cc8fa0f2bc0d.tar.xz |
Formatting the value of a GtkScale is actually pretty tricky, because
the lower and upper values representations are used to compute the size
required do draw *all* values. This means the representations for the
lower and upper bounds have to be at least as big as any other possible
value, failing that leads to wrapping and overflowing of the value
representation.
This was previously partially done in `time_to_string_text()`, but not
only wasn't it comprehensive (it only did so for whole minutes < 59),
but it also meant that if one of the bounds wasn't a whole minute it
didn't have the desired effect.
Fix this by extracting the code for padding the string outside of the
time formatting, and pad the resulting format string whatever it is.
Also improve the padding to try and be less visible, by padding to the
side where we don't want the value to align (e.g. pad on the right if
we want the value left-aligned).
This is still basically a sad hack, but there doesn't seem to be a
better way to do this when neither the lower nor upper bound is
necessarily the largest value.
Diffstat (limited to 'distro/archlinux/mate-screensaver.pam')
0 files changed, 0 insertions, 0 deletions