It's difficult to make iterative developments when there's two nearly-identical types that need to be kept synchronized to any change. Rust gives us traits so we should use them instead of duplicating code. This made it easier to make styling and layout improvements to both instances of the segmented button.
43 lines
826 B
Rust
43 lines
826 B
Rust
// Copyright 2022 System76 <info@system76.com>
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
mod button;
|
|
pub use button::*;
|
|
|
|
mod header_bar;
|
|
pub use header_bar::{header_bar, HeaderBar};
|
|
|
|
mod icon;
|
|
pub use self::icon::{icon, Icon, IconSource};
|
|
|
|
pub mod list;
|
|
pub use self::list::*;
|
|
|
|
pub mod nav_button;
|
|
pub use self::nav_button::{nav_button, NavButton};
|
|
|
|
pub mod navigation;
|
|
pub use navigation::*;
|
|
|
|
mod toggler;
|
|
pub use toggler::toggler;
|
|
|
|
pub mod segmented_button;
|
|
pub use segmented_button::{
|
|
horizontal_segmented_button, vertical_segmented_button, HorizontalSegmentedButton,
|
|
};
|
|
|
|
pub mod settings;
|
|
|
|
mod scrollable;
|
|
pub use scrollable::*;
|
|
|
|
pub mod separator;
|
|
pub use separator::{horizontal_rule, vertical_rule};
|
|
|
|
pub mod spin_button;
|
|
pub use spin_button::{spin_button, SpinButton};
|
|
|
|
pub mod rectangle_tracker;
|
|
|
|
pub mod aspect_ratio;
|