summaryrefslogtreecommitdiff
path: root/AUTHORS
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2024-05-21 10:51:37 +0200
committerGitHub <[email protected]>2024-05-21 10:51:37 +0200
commita3def4737c267b649194fd8c2f37cc8fa0f2bc0d (patch)
treefb9741e3151e05b834afbb7d49b92e6d079255dd /AUTHORS
parent72827148e15294308c20c06d3a5b9654d8b24a7f (diff)
downloadmate-screensaver-a3def4737c267b649194fd8c2f37cc8fa0f2bc0d.tar.bz2
mate-screensaver-a3def4737c267b649194fd8c2f37cc8fa0f2bc0d.tar.xz
mate-screensaver-preferences: Improve and cleanup time scale formatting (#295)HEADmaster
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 'AUTHORS')
0 files changed, 0 insertions, 0 deletions