wip(theme): use transparent overlays for component colors where possible
This commit is contained in:
parent
2dde95ee42
commit
a449a52dee
8 changed files with 49 additions and 47 deletions
|
|
@ -59,10 +59,10 @@ impl<'a, Message: 'static> From<ListColumn<'a, Message>> for Element<'a, Message
|
|||
#[must_use]
|
||||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||
pub fn style(theme: &crate::Theme) -> iced::widget::container::Appearance {
|
||||
let cosmic = &theme.cosmic().primary;
|
||||
let cosmic = &theme.cosmic();
|
||||
iced::widget::container::Appearance {
|
||||
text_color: Some(cosmic.on.into()),
|
||||
background: Some(Background::Color(cosmic.base.into())),
|
||||
background: Some(Background::Color(cosmic.basic.base.into())),
|
||||
border_radius: 8.0,
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ where
|
|||
|
||||
#[must_use]
|
||||
pub fn nav_bar_style(theme: &Theme) -> iced_style::container::Appearance {
|
||||
let cosmic = &theme.cosmic().primary;
|
||||
let cosmic = &theme.cosmic();
|
||||
iced_style::container::Appearance {
|
||||
text_color: Some(cosmic.on.into()),
|
||||
background: Some(Background::Color(cosmic.base.into())),
|
||||
background: Some(Background::Color(cosmic.primary.base.into())),
|
||||
border_radius: 8.0,
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ fn clear_button<Message: 'static>() -> Button<'static, Message, Renderer> {
|
|||
fn active_style(theme: &crate::Theme) -> container::Appearance {
|
||||
let cosmic = &theme.cosmic();
|
||||
iced::widget::container::Appearance {
|
||||
text_color: Some(cosmic.primary.on.into()),
|
||||
background: Some(Background::Color(cosmic.secondary.component.divider.into())),
|
||||
text_color: Some(cosmic.on.into()),
|
||||
background: Some(Background::Color(cosmic.divider.into())),
|
||||
border_radius: 24.0,
|
||||
border_width: 2.0,
|
||||
border_color: cosmic.accent.focus.into(),
|
||||
|
|
|
|||
|
|
@ -97,11 +97,11 @@ impl<'a, Message: 'static> From<SpinButton<'a, Message>> for Element<'a, Message
|
|||
|
||||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||
fn container_style(theme: &crate::Theme) -> iced_style::container::Appearance {
|
||||
let secondary = &theme.cosmic().secondary;
|
||||
let basic = &theme.cosmic().basic;
|
||||
let accent = &theme.cosmic().accent;
|
||||
iced_style::container::Appearance {
|
||||
text_color: None,
|
||||
background: Some(Background::Color(secondary.component.base.into())),
|
||||
background: Some(Background::Color(basic.base.into())),
|
||||
border_radius: 24.0,
|
||||
border_width: 0.0,
|
||||
border_color: accent.base.into(),
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ impl<'a, Message: 'static + Clone> From<Warning<'a, Message>> for Element<'a, Me
|
|||
|
||||
pub fn warning_container(theme: &Theme) -> widget::container::Appearance {
|
||||
widget::container::Appearance {
|
||||
text_color: Some(theme.cosmic().on_warning_color().into()),
|
||||
text_color: Some(theme.cosmic().warning.on.into()),
|
||||
background: Some(Background::Color(theme.cosmic().warning_color().into())),
|
||||
border_radius: 0.0,
|
||||
border_width: 0.0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue