improv(segmented_button): rework layout, drawing, and styling to fix visual flaws
This commit is contained in:
parent
bd353c6b54
commit
366a450977
9 changed files with 364 additions and 170 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use cosmic_config::{Config, ConfigGet, ConfigSet, CosmicConfigEntry};
|
||||
use cosmic_config::{Config, ConfigGet, CosmicConfigEntry};
|
||||
|
||||
/// ID for the ThemeMode config
|
||||
pub const THEME_MODE_ID: &str = "com.system76.CosmicTheme.Mode";
|
||||
|
|
|
|||
|
|
@ -157,19 +157,32 @@ impl Theme {
|
|||
pub fn accent_color(&self) -> Srgba {
|
||||
self.accent.base.clone()
|
||||
}
|
||||
|
||||
/// get @success_color
|
||||
pub fn success_color(&self) -> Srgba {
|
||||
self.success.base.clone()
|
||||
}
|
||||
|
||||
/// get @destructive_color
|
||||
pub fn destructive_color(&self) -> Srgba {
|
||||
self.destructive.base.clone()
|
||||
}
|
||||
|
||||
/// get @warning_color
|
||||
pub fn warning_color(&self) -> Srgba {
|
||||
self.warning.base.clone()
|
||||
}
|
||||
|
||||
/// get @small_container_widget
|
||||
pub fn small_container_widget(&self) -> Srgba {
|
||||
self.palette.gray_2.clone()
|
||||
}
|
||||
|
||||
/// get @small_widget_divider
|
||||
pub fn small_widget_divider(&self) -> Srgba {
|
||||
self.palette.neutral_9.clone()
|
||||
}
|
||||
|
||||
// Containers
|
||||
/// get @bg_color
|
||||
pub fn bg_color(&self) -> Srgba {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue