feat(segmented-button): Configurable background and hover styling
This commit is contained in:
parent
f84410608b
commit
3454483345
3 changed files with 93 additions and 24 deletions
|
|
@ -6,16 +6,23 @@ use iced_core::{Background, BorderRadius, Color};
|
|||
/// The appearance of a [`SegmentedButton`].
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Appearance {
|
||||
pub background: Option<Background>,
|
||||
pub border_color: Color,
|
||||
pub border_radius: BorderRadius,
|
||||
pub border_width: f32,
|
||||
pub button_active: ButtonAppearance,
|
||||
pub button_inactive: ButtonAppearance,
|
||||
pub button_hover: ButtonAppearance,
|
||||
}
|
||||
|
||||
/// The appearance of a button in the [`SegmentedButton`]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct ButtonAppearance {
|
||||
pub background: Option<Background>,
|
||||
pub border_radius: BorderRadius,
|
||||
pub border_bottom: Option<(f32, Color)>,
|
||||
pub border_radius_first: BorderRadius,
|
||||
pub border_radius_middle: BorderRadius,
|
||||
pub border_radius_last: BorderRadius,
|
||||
pub text_color: Color,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue