feat(segmented_button): add FileNav style with related widget improvements

This commit is contained in:
Michael Aaron Murphy 2025-08-19 11:13:28 +02:00
parent 8412dd5939
commit c10695600b
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 100 additions and 57 deletions

View file

@ -18,6 +18,8 @@ pub enum SegmentedButton {
Control,
/// Navigation bar style
NavBar,
/// File browser
FileNav,
/// Or implement any custom theme of your liking.
Custom(Box<dyn Fn(&Theme) -> Appearance>),
}
@ -69,7 +71,7 @@ impl StyleSheet for Theme {
}
}
SegmentedButton::NavBar => Appearance {
SegmentedButton::NavBar | SegmentedButton::FileNav => Appearance {
active_width: 0.0,
..horizontal::tab_bar(cosmic, container)
},
@ -124,7 +126,7 @@ impl StyleSheet for Theme {
}
}
SegmentedButton::NavBar => Appearance {
SegmentedButton::NavBar | SegmentedButton::FileNav => Appearance {
active_width: 0.0,
..vertical::tab_bar(cosmic, container)
},