Skip to content

Vertically center slider

Normally this happens automatically, but if you manually override the height of a slider, then the bar and handle become top-aligned within the larger-than-normal bounding box rather than being vertically centered. Why would you want to override the height of a slider? To provide a larger-than-normal click/drag/scroll areas for use cases that benefit from this, such as the playback slider of a music player app.

This commit makes the control always be vertically entered within its bounding box when the height of that box is manually overridden.

There are no changes or regressions for sliders that have the default height.

BUG: 410672 FIXED-IN: 5.86

cc @cblack @ndavis

Merge request reports