44 lines
983 B
QML
44 lines
983 B
QML
import Quickshell
|
|
import QtQuick
|
|
import ZShell.Config
|
|
import qs.Modules.Bar.Components.Common
|
|
import qs.Modules.Bar.Popouts
|
|
import qs.Daemons
|
|
import qs.Components
|
|
import qs.Services
|
|
|
|
WidgetBase {
|
|
id: root
|
|
|
|
required property Wrapper popouts
|
|
required property ScreenState screenState
|
|
|
|
color: screenState.sidebar ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
|
|
radius: Tokens.rounding.full
|
|
|
|
MaterialIcon {
|
|
id: notificationCenterIcon
|
|
|
|
anchors.centerIn: parent
|
|
color: root.screenState.sidebar ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
|
fill: root.screenState.sidebar ? 1 : 0
|
|
fontStyle: Tokens.font.icon.size(16).build()
|
|
text: NotifServer.list.length ? "\uf4fe" : "\ue7f4"
|
|
|
|
Behavior on color {
|
|
CAnim {}
|
|
}
|
|
Behavior on fill {
|
|
Anim {}
|
|
}
|
|
}
|
|
|
|
StateLayer {
|
|
color: root.screenState.sidebar ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
|
|
|
onClicked: {
|
|
root.screenState.sidebar = !root.screenState.sidebar;
|
|
}
|
|
}
|
|
}
|