Re: StackLayout bug?
[email protected] Fri, 24 Jan 2020 21:31:27 +0100
| Newsgroups | gmane.comp.audio.supercollider.devel |
|---|---|
| Message-ID | <[email protected]> |
i found a workaround for this issue and that is to wrap the StackLayout inside a View with a controllable height...
(
var win= Window("ttest", Rect(100, 100, 240, 320));
win.layout_(VLayout(
Button().states_([["1"]]),
Button().states_([["2"]]),
View().maxHeight_(20).layout_(StackLayout( //workaround
StaticText().string_("2.8")
)),
Button().states_([["3"]]),
Button().states_([["4"]])
)).front;
CmdPeriod.doOnce({win.close});
)
still think it's a bug in StackLayout, but the qt code for it reads like greek to me.
_f
> 19 jan. 2020 kl. 19:14 skrev [email protected]:
>
> //here is the problem...
> (
> var win= Window("ttest", Rect(100, 100, 240, 320));
> win.layout_(VLayout(
> Button().states_([["1"]]),
> Button().states_([["2"]]),
> StackLayout(
> StaticText().string_("2.8").maxHeight_(20) //stacklayout does not respect this. compare with hlayout
> ),
> Button().states_([["3"]]),
> Button().states_([["4"]])
> )).front;
> CmdPeriod.doOnce({win.close});
> )
#|
fredrikolofsson.com musicalfieldsforever.com
|#