sidebar: Better active menu background (#793)
This commit is contained in:
parent
8930acf648
commit
0c4a0538e6
1 changed files with 5 additions and 1 deletions
|
|
@ -161,12 +161,16 @@ impl RenderOnce for SidebarMenuItem {
|
||||||
.rounded(cx.theme().radius)
|
.rounded(cx.theme().radius)
|
||||||
.text_sm()
|
.text_sm()
|
||||||
.hover(|this| {
|
.hover(|this| {
|
||||||
|
if is_active {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
this.bg(cx.theme().sidebar_accent)
|
this.bg(cx.theme().sidebar_accent)
|
||||||
.text_color(cx.theme().sidebar_accent_foreground)
|
.text_color(cx.theme().sidebar_accent_foreground)
|
||||||
})
|
})
|
||||||
.when(is_active && !is_submenu, |this| {
|
.when(is_active && !is_submenu, |this| {
|
||||||
this.font_medium()
|
this.font_medium()
|
||||||
.bg(cx.theme().sidebar_accent)
|
.bg(cx.theme().accent)
|
||||||
.text_color(cx.theme().sidebar_accent_foreground)
|
.text_color(cx.theme().sidebar_accent_foreground)
|
||||||
})
|
})
|
||||||
.when_some(self.icon.clone(), |this, icon| this.child(icon))
|
.when_some(self.icon.clone(), |this, icon| this.child(icon))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue