Skip to content

stylesheet: Fix scale value margins with GTK changes

Matthijs Velsink requested to merge scale-fix-drawn-value into main

Commit gtk@d58b545f fixed a double counting of value size, but didn't check whether that actually looked great. It doesn't.

Because the slider has negative margins, we need to add margin to the value if it's on a side with no marks. If it is on a side with marks, the scale will make it touch the marks. We therefore apply a mark's size of margin to have the value be in the same place, with or without marks.

This is the same fix as proposed in gtk!7656 (merged), which has more screenshot for the GTK Adwaita theme.

Before
Screenshot_from_2024-08-27_22-18-14

After
Screenshot_from_2024-08-27_22-18-29

(Was a bit lazy, just added a value to the balance slider of the Settings sound panel, but the issue should be clear)

Merge request reports