refactor opaque fallback
This commit is contained in:
parent
d0b164d216
commit
19142fd38e
12 changed files with 345 additions and 161 deletions
|
|
@ -31,16 +31,26 @@ impl crate::widget::card::style::Catalog for crate::Theme {
|
|||
|
||||
match self.layer {
|
||||
cosmic_theme::Layer::Background => crate::widget::card::style::Style {
|
||||
card_1: Background::Color(cosmic.background.component.hover.into()),
|
||||
card_2: Background::Color(cosmic.background.component.pressed.into()),
|
||||
card_1: Background::Color(
|
||||
cosmic.background(self.transparent).component.hover.into(),
|
||||
),
|
||||
card_2: Background::Color(
|
||||
cosmic.background(self.transparent).component.pressed.into(),
|
||||
),
|
||||
},
|
||||
cosmic_theme::Layer::Primary => crate::widget::card::style::Style {
|
||||
card_1: Background::Color(cosmic.primary.component.hover.into()),
|
||||
card_2: Background::Color(cosmic.primary.component.pressed.into()),
|
||||
card_1: Background::Color(cosmic.primary(self.transparent).component.hover.into()),
|
||||
card_2: Background::Color(
|
||||
cosmic.primary(self.transparent).component.pressed.into(),
|
||||
),
|
||||
},
|
||||
cosmic_theme::Layer::Secondary => crate::widget::card::style::Style {
|
||||
card_1: Background::Color(cosmic.secondary.component.hover.into()),
|
||||
card_2: Background::Color(cosmic.secondary.component.pressed.into()),
|
||||
card_1: Background::Color(
|
||||
cosmic.secondary(self.transparent).component.hover.into(),
|
||||
),
|
||||
card_2: Background::Color(
|
||||
cosmic.secondary(self.transparent).component.pressed.into(),
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ pub fn menu_items<
|
|||
}
|
||||
|
||||
fn key_style(theme: &crate::Theme) -> TextStyle {
|
||||
let mut color = theme.cosmic().background.component.on;
|
||||
let mut color = theme.cosmic().background(theme.transparent).component.on;
|
||||
color.alpha *= 0.75;
|
||||
TextStyle {
|
||||
color: Some(color.into()),
|
||||
|
|
|
|||
|
|
@ -172,7 +172,9 @@ pub fn nav_bar_style(theme: &Theme) -> iced_widget::container::Style {
|
|||
iced_widget::container::Style {
|
||||
icon_color: Some(cosmic.on_bg_color().into()),
|
||||
text_color: Some(cosmic.on_bg_color().into()),
|
||||
background: Some(Background::Color(cosmic.primary.base.into())),
|
||||
background: Some(Background::Color(
|
||||
cosmic.primary(theme.transparent).base.into(),
|
||||
)),
|
||||
border: Border {
|
||||
width: 0.0,
|
||||
color: Color::TRANSPARENT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue