refactor!: separate horizontal and vertical segmented button widgets

- Removes the orientation enum in favor of two separate widgets
- Implements the spacing attribute for both widgets
- Demo is updated to display spaced variants of the widgets
This commit is contained in:
Michael Aaron Murphy 2023-01-03 19:35:34 +01:00 committed by Michael Murphy
parent 3af1da6332
commit 444e389496
12 changed files with 969 additions and 547 deletions

View file

@ -23,7 +23,12 @@ mod toggler;
pub use toggler::toggler;
pub mod segmented_button;
pub use segmented_button::{SegmentedButton, segmented_button};
pub use segmented_button::{
HorizontalSegmentedButton,
VerticalSegmentedButton,
horizontal_segmented_button,
vertical_segmented_button
};
pub mod settings;
@ -38,11 +43,4 @@ pub use spin_button::{SpinButton, spin_button};
pub mod rectangle_tracker;
pub mod aspect_ratio;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub enum Orientation {
#[default]
Horizontal,
Vertical
}
pub mod aspect_ratio;