notifications to icon button
This commit is contained in:
parent
2762c7952a
commit
160cd3c1d5
1 changed files with 7 additions and 19 deletions
|
|
@ -1,34 +1,22 @@
|
||||||
import qs.components
|
import qs.components
|
||||||
import qs.config
|
|
||||||
import qs.constants
|
import qs.constants
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.widgets
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
StyledButton {
|
StyledIconButton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
menu.toggle();
|
menu.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
content: StyledText {
|
text: Notifications.hasNotifications ? Icons.bell : Icons.bellRing
|
||||||
id: text
|
|
||||||
|
|
||||||
font.family: Theme.lucide.font.family
|
|
||||||
font.pixelSize: Dimensions.notifications.fontSize
|
|
||||||
font.bold: true
|
|
||||||
text: Icons.bell
|
|
||||||
|
|
||||||
color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent
|
|
||||||
|
|
||||||
states: State {
|
states: State {
|
||||||
when: Notifications.hasNotifications
|
when: Notifications.hasNotifications
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
text {
|
root {
|
||||||
text: Icons.bellRing
|
text: Icons.bellRing
|
||||||
color: root.containsMouse ? Theme.palette.base300 : Theme.palette.secondary
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue