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 id: hoverLayer
anchors.fill: parent anchors.fill: parent
border.pixelAligned: false
color: Qt.alpha(root.color, root.disabled ? 0 : root.pressed ? 0.1 : root.containsMouse ? 0.08 : 0) color: Qt.alpha(root.color, root.disabled ? 0 : root.pressed ? 0.1 : root.containsMouse ? 0.08 : 0)
radius: root.radius radius: root.radius
@@ -84,6 +85,7 @@ MouseArea {
radius: 1000 radius: 1000
color: root.color color: root.color
opacity: 0 opacity: 0
border.pixelAligned: false
transform: Translate { transform: Translate {
x: -ripple.width / 2 x: -ripple.width / 2
+9 -6
View File
@@ -55,11 +55,11 @@ RowLayout {
// popouts.hasCurrent = false; // popouts.hasCurrent = false;
} }
} else if ( id === "clock" && Config.barConfig.popouts.clock ) { } else if ( id === "clock" && Config.barConfig.popouts.clock ) {
Calendar.displayYear = new Date().getFullYear(); // Calendar.displayYear = new Date().getFullYear();
Calendar.displayMonth = new Date().getMonth(); // Calendar.displayMonth = new Date().getMonth();
popouts.currentName = "calendar"; // popouts.currentName = "calendar";
popouts.currentCenter = Qt.binding( () => item.mapToItem( root, itemWidth / 2, 0 ).x ); // popouts.currentCenter = Qt.binding( () => item.mapToItem( root, itemWidth / 2, 0 ).x );
popouts.hasCurrent = true; // popouts.hasCurrent = true;
} else if ( x > (root.width / 2 + 50) && x < (root.width / 2 - 50) && Config.barConfig.popouts.activeWindow ) { } else if ( x > (root.width / 2 + 50) && x < (root.width / 2 - 50) && Config.barConfig.popouts.activeWindow ) {
popouts.currentName = "dash"; popouts.currentName = "dash";
popouts.currentCenter = root.width / 2; popouts.currentCenter = root.width / 2;
@@ -144,7 +144,10 @@ RowLayout {
DelegateChoice { DelegateChoice {
roleValue: "clock" roleValue: "clock"
delegate: WrappedLoader { delegate: WrappedLoader {
sourceComponent: Clock {} sourceComponent: Clock {
popouts: root.popouts
loader: root
}
} }
} }
DelegateChoice { DelegateChoice {
+28 -4
View File
@@ -1,18 +1,28 @@
import QtQuick import QtQuick
import QtQuick.Layouts
import qs.Config import qs.Config
import qs.Modules import qs.Modules
import qs.Helpers as Helpers
import qs.Components
Item { Item {
implicitWidth: timeText.contentWidth required property Wrapper popouts
required property RowLayout loader
implicitWidth: timeText.contentWidth + 5 * 2
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
CustomRect {
anchors.fill: parent
anchors.topMargin: 3
anchors.bottomMargin: 3
radius: 4
color: "transparent"
Text { Text {
id: timeText id: timeText
anchors.left: parent.left anchors.centerIn: parent
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: Time.time text: Time.time
color: Config.useDynamicColors ? DynamicColors.palette.m3tertiary : "white" color: Config.useDynamicColors ? DynamicColors.palette.m3tertiary : "white"
@@ -21,4 +31,18 @@ Item {
CAnim {} 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;
}
}
}
}
} }
+10 -6
View File
@@ -10,16 +10,20 @@ Item {
required property PersistentProperties visibilities required property PersistentProperties visibilities
implicitWidth: 20 implicitWidth: 25
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
CustomRect {
anchors.fill: parent
anchors.topMargin: 3
anchors.bottomMargin: 3
color: "transparent"
radius: 4
MaterialIcon { MaterialIcon {
id: notificationCenterIcon id: notificationCenterIcon
anchors.left: parent.left anchors.centerIn: parent
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
property color iconColor: Config.useDynamicColors ? DynamicColors.palette.m3tertiaryFixed : "white" property color iconColor: Config.useDynamicColors ? DynamicColors.palette.m3tertiaryFixed : "white"
@@ -31,9 +35,9 @@ Item {
Behavior on color { Behavior on color {
CAnim {} CAnim {}
} }
}
MouseArea { StateLayer {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
// Hyprland.dispatch("global zshell-nc:toggle-nc"); // Hyprland.dispatch("global zshell-nc:toggle-nc");