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,6 +5,7 @@ import qs.Common.Styled
Item {
id: root
property int targetYear: new Date().getFullYear()
property int targetMonth: new Date().getMonth() // 0-11
property date currentDate: new Date()

View File

@@ -4,11 +4,10 @@ import Quickshell
import qs.Common
Singleton {
id: mediatorRoot
id: root
property var component: null
property string type: ""
property int x: component? component.implicitWidth : 0
property int y: component? (component.implicitHeight + Theme.gaps) : 100
property int x: component ? component.implicitWidth : 0
property int y: component ? (component.implicitHeight + Theme.gaps) : 100
}

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 : ""
}
}
}

View File

@@ -2,9 +2,10 @@ import QtQuick
import qs.Common
Rectangle {
id: root
color: Theme.backgroudColor
border.width: 1
border.width: 2
border.color: Theme.color2
radius: 20
}

View File

@@ -2,6 +2,7 @@ import QtQuick
import qs.Common
Rectangle {
id: root
color: Theme.backgroudColorBright
radius: 20

View File

@@ -2,7 +2,7 @@ import QtQuick
import qs.Common
Text {
id: clockText
id: root
anchors.margins: 5
horizontalAlignment: Text.AlignHCenter

View File

@@ -5,7 +5,7 @@ import Quickshell
import Quickshell.Io
Singleton {
id: timeRoot
id: root
readonly property int barSize: 35
readonly property double heightGaps: barSize * 0.8
@@ -18,7 +18,7 @@ Singleton {
// Colors
FileView {
id: walColors
path: Qt.resolvedUrl(Quickshell.env("XDG_CACHE_HOME")+"/wal/colors")
path: Qt.resolvedUrl(Quickshell.env("XDG_CACHE_HOME") + "/wal/colors")
blockLoading: true
watchChanges: true
onFileChanged: this.reload()