feat(app-list): accent colored dot when focused
This commit is contained in:
parent
f9607b3686
commit
08bbc1cf95
1 changed files with 19 additions and 9 deletions
|
|
@ -184,9 +184,11 @@ impl DockItem {
|
||||||
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
||||||
move |theme| container::Appearance {
|
move |theme| container::Appearance {
|
||||||
text_color: Some(Color::TRANSPARENT),
|
text_color: Some(Color::TRANSPARENT),
|
||||||
background: Some(Background::Color(
|
background: if is_focused {
|
||||||
theme.cosmic().on_bg_color().into(),
|
Some(Background::Color(theme.cosmic().accent_color().into()))
|
||||||
)),
|
} else {
|
||||||
|
Some(Background::Color(theme.cosmic().on_bg_color().into()))
|
||||||
|
},
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: dot_border_radius.into(),
|
radius: dot_border_radius.into(),
|
||||||
width: 0.0,
|
width: 0.0,
|
||||||
|
|
@ -208,9 +210,13 @@ impl DockItem {
|
||||||
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
||||||
move |theme| container::Appearance {
|
move |theme| container::Appearance {
|
||||||
text_color: Some(Color::TRANSPARENT),
|
text_color: Some(Color::TRANSPARENT),
|
||||||
background: Some(Background::Color(
|
background: if is_focused {
|
||||||
theme.cosmic().on_bg_color().into(),
|
Some(Background::Color(
|
||||||
)),
|
theme.cosmic().accent_color().into(),
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
Some(Background::Color(theme.cosmic().on_bg_color().into()))
|
||||||
|
},
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: dot_border_radius.into(),
|
radius: dot_border_radius.into(),
|
||||||
width: 0.0,
|
width: 0.0,
|
||||||
|
|
@ -230,9 +236,13 @@ impl DockItem {
|
||||||
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
.style(<Theme as container::StyleSheet>::Style::Custom(Box::new(
|
||||||
move |theme| container::Appearance {
|
move |theme| container::Appearance {
|
||||||
text_color: Some(Color::TRANSPARENT),
|
text_color: Some(Color::TRANSPARENT),
|
||||||
background: Some(Background::Color(
|
background: if is_focused {
|
||||||
theme.cosmic().on_bg_color().into(),
|
Some(Background::Color(
|
||||||
)),
|
theme.cosmic().accent_color().into(),
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
Some(Background::Color(theme.cosmic().on_bg_color().into()))
|
||||||
|
},
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: dot_border_radius.into(),
|
radius: dot_border_radius.into(),
|
||||||
width: 0.0,
|
width: 0.0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue