refactor!(widget): rename segmented_selection to segmented_control to match Figma docs

This commit is contained in:
Michael Aaron Murphy 2024-02-26 16:20:24 +01:00 committed by Michael Murphy
parent 366a450977
commit bfc84c4759
6 changed files with 11 additions and 11 deletions

View file

@ -13,7 +13,7 @@ pub enum SegmentedButton {
#[default]
ViewSwitcher,
/// A widget for multiple choice selection.
Selection,
Control,
/// Or implement any custom theme of your liking.
Custom(Box<dyn Fn(&Theme) -> Appearance>),
}
@ -54,7 +54,7 @@ impl StyleSheet for Theme {
..Default::default()
}
}
SegmentedButton::Selection => {
SegmentedButton::Control => {
let cosmic = self.cosmic();
let active = horizontal::selection_active(cosmic);
let mut neutral_5 = cosmic.palette.neutral_5;
@ -110,7 +110,7 @@ impl StyleSheet for Theme {
..Default::default()
}
}
SegmentedButton::Selection => {
SegmentedButton::Control => {
let active = vertical::selection_active(cosmic);
let mut neutral_5 = cosmic.palette.neutral_5;
neutral_5.alpha = 0.2;