Add a placeholder for the SC spectrum analyzer
This commit is contained in:
parent
4e304fc65a
commit
74eb6fe2e5
|
@ -88,6 +88,14 @@ pub(crate) fn create(
|
||||||
|
|
||||||
HStack::new(cx, |cx| {
|
HStack::new(cx, |cx| {
|
||||||
main_column(cx);
|
main_column(cx);
|
||||||
|
|
||||||
|
let visualizer_visible = Data::editor_mode
|
||||||
|
.map(|editor_mode| editor_mode.load() == EditorMode::VisualizerVisible);
|
||||||
|
Binding::new(cx, visualizer_visible, |cx, visualizer_visible| {
|
||||||
|
if visualizer_visible.get(cx) {
|
||||||
|
visualizer_column(cx);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -213,6 +221,20 @@ fn main_column(cx: &mut Context) {
|
||||||
.child_right(Stretch(1.0));
|
.child_right(Stretch(1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn visualizer_column(cx: &mut Context) {
|
||||||
|
HStack::new(cx, |cx| {
|
||||||
|
Label::new(cx, "When I grow up I want to be a spectrum analyzer!");
|
||||||
|
})
|
||||||
|
// These arbitrary 12 pixels are to align with the visualizer toggle botton
|
||||||
|
.space(Pixels(12.0))
|
||||||
|
.bottom(Pixels(12.0))
|
||||||
|
.left(Pixels(2.0))
|
||||||
|
.top(Pixels(12.0))
|
||||||
|
.child_space(Stretch(1.0))
|
||||||
|
.border_width(Pixels(1.0))
|
||||||
|
.border_color(Color::black());
|
||||||
|
}
|
||||||
|
|
||||||
fn make_column(cx: &mut Context, title: &str, contents: impl FnOnce(&mut Context)) {
|
fn make_column(cx: &mut Context, title: &str, contents: impl FnOnce(&mut Context)) {
|
||||||
VStack::new(cx, |cx| {
|
VStack::new(cx, |cx| {
|
||||||
Label::new(cx, title)
|
Label::new(cx, title)
|
||||||
|
|
Loading…
Reference in a new issue