notif actions fix

This commit is contained in:
Zacharias-Brohn
2026-02-05 16:39:03 +01:00
parent 73a3b85141
commit ce841444ca
4 changed files with 73 additions and 40 deletions
+2
View File
@@ -74,6 +74,7 @@ MouseArea {
id: hoverLayer
anchors.fill: parent
border.pixelAligned: false
color: Qt.alpha(root.color, root.disabled ? 0 : root.pressed ? 0.1 : root.containsMouse ? 0.08 : 0)
radius: root.radius
@@ -84,6 +85,7 @@ MouseArea {
radius: 1000
color: root.color
opacity: 0
border.pixelAligned: false
transform: Translate {
x: -ripple.width / 2
+9 -6
View File
@@ -55,11 +55,11 @@ RowLayout {
// popouts.hasCurrent = false;
}
} else if ( id === "clock" && Config.barConfig.popouts.clock ) {
Calendar.displayYear = new Date().getFullYear();
Calendar.displayMonth = new Date().getMonth();
popouts.currentName = "calendar";
popouts.currentCenter = Qt.binding( () => item.mapToItem( root, itemWidth / 2, 0 ).x );
popouts.hasCurrent = true;
// Calendar.displayYear = new Date().getFullYear();
// Calendar.displayMonth = new Date().getMonth();
// popouts.currentName = "calendar";
// popouts.currentCenter = Qt.binding( () => item.mapToItem( root, itemWidth / 2, 0 ).x );
// popouts.hasCurrent = true;
} else if ( x > (root.width / 2 + 50) && x < (root.width / 2 - 50) && Config.barConfig.popouts.activeWindow ) {
popouts.currentName = "dash";
popouts.currentCenter = root.width / 2;
@@ -144,7 +144,10 @@ RowLayout {
DelegateChoice {
roleValue: "clock"
delegate: WrappedLoader {
sourceComponent: Clock {}
sourceComponent: Clock {
popouts: root.popouts
loader: root
}
}
}
DelegateChoice {
+36 -12
View File
@@ -1,24 +1,48 @@
import QtQuick
import QtQuick.Layouts
import qs.Config
import qs.Modules
import qs.Helpers as Helpers
import qs.Components
Item {
implicitWidth: timeText.contentWidth
required property Wrapper popouts
required property RowLayout loader
implicitWidth: timeText.contentWidth + 5 * 2
anchors.top: parent.top
anchors.bottom: parent.bottom
Text {
id: timeText
CustomRect {
anchors.fill: parent
anchors.topMargin: 3
anchors.bottomMargin: 3
radius: 4
color: "transparent"
Text {
id: timeText
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.centerIn: parent
text: Time.time
color: Config.useDynamicColors ? DynamicColors.palette.m3tertiary : "white"
text: Time.time
color: Config.useDynamicColors ? DynamicColors.palette.m3tertiary : "white"
Behavior on color {
CAnim {}
}
}
Behavior on color {
CAnim {}
}
}
StateLayer {
acceptedButtons: Qt.LeftButton
onClicked: {
if ( mouse.button === Qt.LeftButton && !visibilities.sidebar ) {
Helpers.Calendar.displayYear = new Date().getFullYear();
Helpers.Calendar.displayMonth = new Date().getMonth();
root.popouts.currentName = "calendar";
root.popouts.currentCenter = Qt.binding( () => item.mapToItem( root.loader, root.implicitWidth / 2, 0 ).x );
root.popouts.hasCurrent = true;
}
}
}
}
}
+26 -22
View File
@@ -10,35 +10,39 @@ Item {
required property PersistentProperties visibilities
implicitWidth: 20
implicitWidth: 25
anchors.top: parent.top
anchors.bottom: parent.bottom
MaterialIcon {
id: notificationCenterIcon
CustomRect {
anchors.fill: parent
anchors.topMargin: 3
anchors.bottomMargin: 3
color: "transparent"
radius: 4
MaterialIcon {
id: notificationCenterIcon
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.centerIn: parent
property color iconColor: Config.useDynamicColors ? DynamicColors.palette.m3tertiaryFixed : "white"
property color iconColor: Config.useDynamicColors ? DynamicColors.palette.m3tertiaryFixed : "white"
text: HasNotifications.hasNotifications ? "\uf4fe" : "\ue7f4"
font.family: "Material Symbols Rounded"
font.pixelSize: 20
color: iconColor
text: HasNotifications.hasNotifications ? "\uf4fe" : "\ue7f4"
font.family: "Material Symbols Rounded"
font.pixelSize: 20
color: iconColor
Behavior on color {
CAnim {}
}
Behavior on color {
CAnim {}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
// Hyprland.dispatch("global zshell-nc:toggle-nc");
StateLayer {
cursorShape: Qt.PointingHandCursor
onClicked: {
// Hyprland.dispatch("global zshell-nc:toggle-nc");
root.visibilities.sidebar = !root.visibilities.sidebar;
}
}
}
}
}
}
}