Add scrollbar to Spectral Compressor's generic GUI
This commit is contained in:
parent
a406f451b0
commit
08c78454da
|
@ -34,7 +34,7 @@ impl Model for Data {}
|
||||||
|
|
||||||
// Makes sense to also define this here, makes it a bit easier to keep track of
|
// Makes sense to also define this here, makes it a bit easier to keep track of
|
||||||
pub(crate) fn default_state() -> Arc<ViziaState> {
|
pub(crate) fn default_state() -> Arc<ViziaState> {
|
||||||
ViziaState::from_size(380, 270)
|
ViziaState::from_size(380, 390)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn create(
|
pub(crate) fn create(
|
||||||
|
@ -56,16 +56,16 @@ pub(crate) fn create(
|
||||||
.height(Pixels(50.0))
|
.height(Pixels(50.0))
|
||||||
.child_top(Stretch(1.0))
|
.child_top(Stretch(1.0))
|
||||||
.child_bottom(Pixels(0.0))
|
.child_bottom(Pixels(0.0))
|
||||||
// Make this more or less align with the parameters column
|
.right(Pixels(10.0));
|
||||||
.right(Percentage(12.0));
|
|
||||||
|
|
||||||
// See the Crisp generic UI for an example using a ScrollView
|
ScrollView::new(cx, 0.0, 0.0, false, true, |cx| {
|
||||||
GenericUi::new(cx, Data::params)
|
// This looks better if it's flush at the top, and then we'll just add some padding
|
||||||
.width(Percentage(100.0))
|
// at the top of the scroll view
|
||||||
.height(Auto)
|
GenericUi::new(cx, Data::params).child_top(Pixels(0.0));
|
||||||
.child_top(Pixels(5.0));
|
|
||||||
})
|
})
|
||||||
.width(Percentage(100.0))
|
.width(Percentage(100.0))
|
||||||
|
.top(Pixels(5.0));
|
||||||
|
})
|
||||||
.row_between(Pixels(0.0))
|
.row_between(Pixels(0.0))
|
||||||
.child_left(Stretch(1.0))
|
.child_left(Stretch(1.0))
|
||||||
.child_right(Stretch(1.0));
|
.child_right(Stretch(1.0));
|
||||||
|
|
Loading…
Reference in a new issue