Workaround for RangeSliders not filling out space in LineLayouts?

If I put Sliders in the “new style” LineLayouts (i.e. HLayout or VLayout), the occupy all the space available hinted by stretch, e.g.

w =;
(w.layout = HLayout( 
	[Slider().orientation_(\vertical).knobColor_(, s:1], 
	[Slider().orientation_(\vertical).knobColor_(, s:1]))

shows something like


But with RangeSliders that space filing doesn’t work

w =;
(w.layout = HLayout(
	[a = RangeSlider().orientation_(\vertical).knobColor_(, s:1],
// passing bounds has no effect here
	[b = RangeSlider(bounds:Rect(0, 0, 60, 100)).orientation_(\vertical).knobColor_(, s:1]))


I have used EZRangeSliders before and for those you can set their bounds properly as you construct them but they are a pain to integrate in “new style” Qt layout s (i.e. not using FlowLayout decorator.)

So, is there a workaround for making “plain” RangeSliders fill the space properly in LineLayouts?

Quite sure I logged this as a bug.

No workaround that I know of.


I see

I found a workaround by creating views and sizing the RangeSliders as big as these, and setting resize = 5 on the sliders.

(w = =  HLayout([a = View(), s:1], [b = View(), s:2]);

x = RangeSlider(a).orientation_(\vertical).resize_(5);
x.bounds_((0@0) @ a.bounds.extent);

y = RangeSlider(b).orientation_(\vertical).resize_(5);
y.bounds_((0@0) @ b.bounds.extent);


Given this, the C++/Qt bugfix I proposed on github will probably work too. I was afraid that because RangeSlider is custom drawn in SC’s C++ code, i.e. not a built-in Qt class, there might be more stuff to do, but apparently there isn’t.