theme: Fix scale sizing during .fine-tune

Depends on !7656 (merged)

Using fine-tune on a GtkScale is maybe a little known feature, but it's also quite wonky. It causes marks, values, and sliders to jump around when activated. This is because it's implemented with less padding around the scale and an increased minimum size.

For example a value drawn left or right of a horizontal scale, as then the height of the scale is the value height plus padding. So fine-tuning compresses the scale vertically.

We can fix this by adding negative margin on the trough instead, without any changes to the padding or minimum size of the scale.

Also, because the trough now grows 3px in all directions, the slider has to do that to, so that margin increases by 3px in all directions compared to what it was, also for the cases with marks.

One last minor detail is that for vertical scales, fine-tuning causes the height of the mark indicators to grow, whereas their width should decrease. That's also fixed.

Before
Screencast_from_2024-08-27_22-57-50

After
Screencast_from_2024-08-27_22-58-36

Edited by Matthijs Velsink

Merge request reports

Loading