Change name of root id to root everywhere
This commit is contained in:
@@ -6,7 +6,7 @@ import qs.Common.Styled
|
||||
import qs.Services
|
||||
|
||||
BackgroundRectangle {
|
||||
id: audioWidget
|
||||
id: root
|
||||
|
||||
property string monitor: ""
|
||||
property string icon: " "
|
||||
@@ -20,26 +20,26 @@ BackgroundRectangle {
|
||||
states: [
|
||||
State {
|
||||
name: "Mute"
|
||||
when: audioWidget.volume == 0 || audioWidget.sink.audio.muted
|
||||
when: root.volume == 0 || root.sink.audio.muted
|
||||
|
||||
PropertyChanges {
|
||||
audioWidget.icon: " "
|
||||
root.icon: " "
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "low volume"
|
||||
when: audioWidget.volume <= 25
|
||||
when: root.volume <= 25
|
||||
|
||||
PropertyChanges {
|
||||
audioWidget.icon: " "
|
||||
root.icon: " "
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "high volume"
|
||||
when: audioWidget.volume > 25
|
||||
when: root.volume > 25
|
||||
|
||||
PropertyChanges {
|
||||
audioWidget.icon: " "
|
||||
root.icon: " "
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -50,23 +50,23 @@ BackgroundRectangle {
|
||||
|
||||
Connections {
|
||||
function onVolumeChanged() {
|
||||
audioWidget.volume = Math.round(Pipewire.defaultAudioSink.audio.volume * 100);
|
||||
root.volume = Math.round(Pipewire.defaultAudioSink.audio.volume * 100);
|
||||
}
|
||||
|
||||
target: audioWidget.audioPipewireActive ? Pipewire.defaultAudioSink.audio : null
|
||||
target: root.audioPipewireActive ? Pipewire.defaultAudioSink.audio : null
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: audioText
|
||||
|
||||
property string audioTextText: audioWidget.audioPipewireActive ? audioWidget.icon + " " + Math.round(Pipewire.defaultAudioSink.audio.volume * 100).toString() + "%" : ""
|
||||
property string audioTextText: root.audioPipewireActive ? root.icon + " " + Math.round(Pipewire.defaultAudioSink.audio.volume * 100).toString() + "%" : ""
|
||||
|
||||
anchors.centerIn: parent
|
||||
text: audioTextText
|
||||
}
|
||||
|
||||
Process {
|
||||
id: audioWidgetProcess
|
||||
id: rootProcess
|
||||
|
||||
running: false
|
||||
command: ["pavucontrol"]
|
||||
@@ -77,7 +77,7 @@ BackgroundRectangle {
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
PopUpHover.start(audioWidget, "audio");
|
||||
PopUpHover.start(root, "audio");
|
||||
}
|
||||
onExited: {
|
||||
// PopUpHover.exit()
|
||||
@@ -87,7 +87,7 @@ BackgroundRectangle {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
parent.sink.audio.muted = !parent.sink.audio.muted;
|
||||
} else if (mouse.button === Qt.LeftButton) {
|
||||
audioWidgetProcess.startDetached();
|
||||
rootProcess.startDetached();
|
||||
}
|
||||
}
|
||||
onWheel: wheel => {
|
||||
@@ -95,12 +95,12 @@ BackgroundRectangle {
|
||||
if (0)
|
||||
return;
|
||||
|
||||
Pipewire.defaultAudioSink.audio.volume = (audioWidget.volume + 5) / 100;
|
||||
Pipewire.defaultAudioSink.audio.volume = (root.volume + 5) / 100;
|
||||
} else if (wheel.angleDelta.y < 0) {
|
||||
if (0)
|
||||
return;
|
||||
|
||||
Pipewire.defaultAudioSink.audio.volume = (audioWidget.volume - 5) / 100;
|
||||
Pipewire.defaultAudioSink.audio.volume = (root.volume - 5) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import Quickshell.Widgets
|
||||
import qs.Common
|
||||
|
||||
WrapperRectangle {
|
||||
id: barArea
|
||||
id: root
|
||||
|
||||
property var monitor: "DP-1"
|
||||
property var components: [] // Add this new property
|
||||
@@ -16,14 +16,14 @@ WrapperRectangle {
|
||||
|
||||
RowLayout {
|
||||
Repeater {
|
||||
model: barArea.components
|
||||
model: root.components
|
||||
|
||||
delegate: Loader {
|
||||
required property var modelData
|
||||
// The source of the loader is the component from the model
|
||||
source: modelData
|
||||
onLoaded: {
|
||||
item.monitor = barArea.monitor;
|
||||
item.monitor = root.monitor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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 : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import qs.Common
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
color: Theme.backgroudColorBright
|
||||
radius: 20
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import qs.Common
|
||||
|
||||
Text {
|
||||
id: clockText
|
||||
id: root
|
||||
|
||||
anchors.margins: 5
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma Singleton
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: timeRoot
|
||||
id: root
|
||||
|
||||
readonly property string time: {
|
||||
Qt.formatDateTime(clock.date, "hh:mm");
|
||||
|
||||
@@ -10,7 +10,7 @@ import qs.Common.Styled
|
||||
import qs.Services
|
||||
|
||||
BackgroundRectangle {
|
||||
id: systrayRoot
|
||||
id: root
|
||||
|
||||
MarginWrapperManager {
|
||||
rightMargin: Theme.gaps
|
||||
|
||||
@@ -11,7 +11,7 @@ import qs.Common
|
||||
import Quickshell.Wayland
|
||||
|
||||
PanelWindow {
|
||||
id: notificationRoot
|
||||
id: root
|
||||
|
||||
anchors {
|
||||
left: true
|
||||
@@ -33,12 +33,12 @@ PanelWindow {
|
||||
focus: true
|
||||
Keys.onPressed: event => {
|
||||
if (event.key == Qt.Key_Escape)
|
||||
notificationRoot.clear();
|
||||
root.clear();
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: notificationRoot.clear()
|
||||
onClicked: root.clear()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
@@ -11,7 +11,7 @@ import qs.Common.Styled
|
||||
import qs.Services
|
||||
|
||||
WrapperMouseArea {
|
||||
id: workspacesWidget
|
||||
id: root
|
||||
|
||||
property var monitor: "black"
|
||||
|
||||
@@ -31,7 +31,7 @@ WrapperMouseArea {
|
||||
|
||||
RowLayout {
|
||||
|
||||
property var monitor: workspacesWidget.monitor
|
||||
property var monitor: root.monitor
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user