Inital commit checkpoint
This commit is contained in:
45
bar/NotificationIcon.qml
Normal file
45
bar/NotificationIcon.qml
Normal file
@@ -0,0 +1,45 @@
|
||||
import qs.common
|
||||
import qs.common.widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
height: parent.height
|
||||
implicitWidth: rowLayout.implicitWidth
|
||||
Layout.leftMargin: Appearance.rounding.screenRounding
|
||||
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: 15
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.m3colors.m3error
|
||||
text: NotificationServer.amountNotifications
|
||||
visible: {
|
||||
NotificationServer.amountNotifications > 0
|
||||
}
|
||||
}
|
||||
|
||||
MaterialSymbol {
|
||||
visible: true
|
||||
anchors.centerIn: parent
|
||||
text: NotificationServer.amountNotifications > 0 ? "notifications_unread" : "notifications"
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: NotificationServer.amountNotifications > 0 ? Appearance.m3colors.m3error : Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colSubtext
|
||||
text: "•"
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user