Skip to content

stylesheet: Fix scale under .fine-tune

Matthijs Velsink requested to merge wip/velsinki/scale-fix-fine-tune into main

Because of how GtkScale works, its minimum height might be determined by e.g. a label on the side. Then changing padding to do a fine-tune will resize the widget, as the padding around the label reduces.

Instead, we can apply negative margin to the trough. That way, it can grow uniformly in all directions without changing size of the scale widget itself.

We also fix a bug in fine-tune for a vertical scale, the mark indicators should shrink in width (6px -> 3px), not grow in height/thickness (1px -> 3px as it was).

Essentially the same as what's attempted in gtk!7659 (merged), but there this approach is trickier because of the surrounding focus box, which Libadwaita does not have.

Merge request reports

Loading