1
0
Fork 0

Add a placeholder for the SC spectrum analyzer

This commit is contained in:
Robbert van der Helm 2023-03-18 16:25:46 +01:00
parent 4e304fc65a
commit 74eb6fe2e5

View file

@ -88,6 +88,14 @@ pub(crate) fn create(
HStack::new(cx, |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));
}
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)) {
VStack::new(cx, |cx| {
Label::new(cx, title)