Change name of root id to root everywhere

This commit is contained in:
2025-10-13 14:35:32 -03:00
parent e4087938a5
commit 23eb623fae
13 changed files with 48 additions and 46 deletions

View File

@@ -5,7 +5,7 @@ import Quickshell.Widgets
import qs.Common.Styled
BackgroundRectangle {
id: notificationWrapper
id: root
signal dismissed
signal timedout
@@ -33,7 +33,7 @@ BackgroundRectangle {
// implicitHeight: Math.max(notifLayout.implicitHeight, 100)
Component.onCompleted: {
notificationWrapper.implicitHeight = targetHeight;
root.implicitHeight = targetHeight;
}
clip: true
@@ -46,9 +46,9 @@ BackgroundRectangle {
ScriptAction {
script: {
if (clicked)
notificationWrapper.dismissed();
if (notificationWrapper.implicitHeight === 0)
notificationWrapper.timedout();
root.dismissed();
if (root.implicitHeight === 0)
root.timedout();
}
}
}
@@ -57,8 +57,8 @@ BackgroundRectangle {
MouseArea {
anchors.fill: parent
onClicked: {
notificationWrapper.clicked = true;
notificationWrapper.implicitHeight = 0;
root.clicked = true;
root.implicitHeight = 0;
}
}
@@ -66,10 +66,10 @@ BackgroundRectangle {
id: notifTimer
interval: timerDuration
running: notificationWrapper.startTimer
running: root.startTimer
onTriggered: {
notificationWrapper.implicitHeight = 0;
root.implicitHeight = 0;
}
}
@@ -88,8 +88,8 @@ BackgroundRectangle {
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: 10
implicitSize: 80
visible: notificationWrapper.image ? true : false
source: notificationWrapper.image
visible: root.image ? true : false
source: root.image
}
ColumnLayout {
@@ -118,7 +118,7 @@ BackgroundRectangle {
anchors.fill: parent
text: notificationWrapper.notification ? notificationWrapper.notification.summary : ""
text: root.notification ? root.notification.summary : ""
}
}
@@ -140,7 +140,7 @@ BackgroundRectangle {
anchors.fill: parent
text: notificationWrapper.notification ? notificationWrapper.notification.body : ""
text: root.notification ? root.notification.body : ""
}
}
}