]> git.huck.website - cellseq.git/commitdiff
fixed: value now below slider for better balance in random section
authorHuck Boles <huck@huck.website>
Sun, 9 Jul 2023 18:35:31 +0000 (13:35 -0500)
committerHuck Boles <huck@huck.website>
Sun, 9 Jul 2023 18:35:31 +0000 (13:35 -0500)
src/display.rs

index b39114738e9ffea9a2285cf3ccbaf43071d8df65..44b010aec5fa45ed12b10dec94b83e3134c08a1a 100644 (file)
@@ -225,11 +225,15 @@ fn randomize_section<'a>(r: f32) -> Element<'a, Message> {
             button("randomize map")
                 .on_press(Message::RandomizeMap)
                 .style(theme::Button::Primary),
-            slider(0.0..=100.0, r * 100.0, |x| {
-                Message::RandChanged(x / 100.0)
-            })
-            .width(Length::Fixed(300.0)),
-            text(format!("{r}")),
+            column![
+                slider(0.0..=100.0, r * 100.0, |x| {
+                    Message::RandChanged(x / 100.0)
+                })
+                .width(Length::Fixed(300.0)),
+                text(format!("{r}")),
+            ]
+            .spacing(10)
+            .align_items(Alignment::Center),
             button("randomize mask")
                 .on_press(Message::RandomizeMask)
                 .style(theme::Button::Primary),