From 50e1de1dc162a607f114a728571df439b2087fcc Mon Sep 17 00:00:00 2001 From: quadbyte Date: Wed, 20 Aug 2025 10:36:45 -0400 Subject: [PATCH] Renamed properties so its easier to understand --- Modules/Bar/BluetoothPanel.qml | 6 ++-- Modules/Bar/WiFiPanel.qml | 6 ++-- Modules/Calendar/Calendar.qml | 6 ++-- .../Notification/NotificationHistoryPanel.qml | 6 ++-- Modules/SettingsPanel/SettingsPanel.qml | 6 ++-- Modules/SidePanel/SidePanel.qml | 6 ++-- Widgets/NPanel.qml | 31 ++++++++++--------- 7 files changed, 34 insertions(+), 33 deletions(-) diff --git a/Modules/Bar/BluetoothPanel.qml b/Modules/Bar/BluetoothPanel.qml index b8b7222..eeb4c7f 100644 --- a/Modules/Bar/BluetoothPanel.qml +++ b/Modules/Bar/BluetoothPanel.qml @@ -11,9 +11,9 @@ import qs.Widgets NPanel { id: root - rWidth: 380 * scaling - rHeight: 500 * scaling - rAnchorRight: true + panelWidth: 380 * scaling + panelHeight: 500 * scaling + panelAnchorRight: true panelContent: Rectangle { color: Color.transparent diff --git a/Modules/Bar/WiFiPanel.qml b/Modules/Bar/WiFiPanel.qml index 9e8a348..7d28bd1 100644 --- a/Modules/Bar/WiFiPanel.qml +++ b/Modules/Bar/WiFiPanel.qml @@ -10,9 +10,9 @@ import qs.Widgets NPanel { id: root - rWidth: 340 * scaling - rHeight: 500 * scaling - rAnchorRight: true + panelWidth: 380 * scaling + panelHeight: 500 * scaling + panelAnchorRight: true property string passwordPromptSsid: "" property string passwordInput: "" diff --git a/Modules/Calendar/Calendar.qml b/Modules/Calendar/Calendar.qml index 3c098ce..762c8ff 100644 --- a/Modules/Calendar/Calendar.qml +++ b/Modules/Calendar/Calendar.qml @@ -10,9 +10,9 @@ import qs.Widgets NPanel { id: root - rWidth: 340 * scaling - rHeight: 320 * scaling - rAnchorRight: true + panelWidth: 340 * scaling + panelHeight: 320 * scaling + panelAnchorRight: true // Main Column panelContent: ColumnLayout { diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index d7b2f21..6c7e465 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -12,9 +12,9 @@ import qs.Widgets NPanel { id: root - rWidth: 400 * scaling - rHeight: 500 * scaling - rAnchorRight: true + panelWidth: 380 * scaling + panelHeight: 500 * scaling + panelAnchorRight: true panelContent: Rectangle { id: notificationRect diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index b4b5ff4..43fb19c 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -11,9 +11,9 @@ import qs.Widgets NPanel { id: root - rWidth: Math.max(screen?.width * 0.5, 1280) * scaling - rHeight: Math.max(screen?.height * 0.5, 720) * scaling - rAnchorCentered: true + panelWidth: Math.max(screen?.width * 0.5, 1280) * scaling + panelHeight: Math.max(screen?.height * 0.5, 720) * scaling + panelAnchorCentered: true // Tabs enumeration, order is NOT relevant enum Tab { diff --git a/Modules/SidePanel/SidePanel.qml b/Modules/SidePanel/SidePanel.qml index 6380a72..bfbff83 100644 --- a/Modules/SidePanel/SidePanel.qml +++ b/Modules/SidePanel/SidePanel.qml @@ -10,9 +10,9 @@ import qs.Widgets NPanel { id: panel - rWidth: 460 * scaling - rHeight: 700 * scaling - rAnchorRight: true + panelWidth: 460 * scaling + panelHeight: 700 * scaling + panelAnchorRight: true panelContent: Item { id: content diff --git a/Widgets/NPanel.qml b/Widgets/NPanel.qml index 7c8f7d4..9dd2aa4 100644 --- a/Widgets/NPanel.qml +++ b/Widgets/NPanel.qml @@ -14,11 +14,11 @@ Loader { property ShellScreen screen property Component panelContent: null - property int rWidth: 1500 - property int rHeight: 400 - property bool rAnchorCentered: false - property bool rAnchorLeft: false - property bool rAnchorRight: false + property int panelWidth: 1500 + property int panelHeight: 400 + property bool panelAnchorCentered: false + property bool panelAnchorLeft: false + property bool panelAnchorRight: false // Animation properties readonly property real originalScale: 0.7 @@ -125,21 +125,22 @@ Loader { border.color: Color.mOutline border.width: Math.max(1, Style.borderS * scaling) layer.enabled: true - width: rWidth - height: rHeight + width: panelWidth + height: panelHeight anchors { - centerIn: rAnchorCentered ? parent : null - left: !rAnchorCentered && rAnchorLeft ? parent.left : parent.center - right: !rAnchorCentered && rAnchorRight ? parent.right : parent.center - top: !rAnchorCentered && (Settings.data.bar.position === "top") ? parent.top : undefined - bottom: !rAnchorCentered && (Settings.data.bar.position === "bottom") ? parent.bottom : undefined + centerIn: panelAnchorCentered ? parent : null + left: !panelAnchorCentered && panelAnchorLeft ? parent.left : parent.center + right: !panelAnchorCentered && panelAnchorRight ? parent.right : parent.center + top: !panelAnchorCentered && (Settings.data.bar.position === "top") ? parent.top : undefined + bottom: !panelAnchorCentered && (Settings.data.bar.position === "bottom") ? parent.bottom : undefined // margins - topMargin: !rAnchorCentered && (Settings.data.bar.position === "top") ? Style.marginS * scaling : undefined - bottomMargin: !rAnchorCentered + topMargin: !panelAnchorCentered + && (Settings.data.bar.position === "top") ? Style.marginS * scaling : undefined + bottomMargin: !panelAnchorCentered && (Settings.data.bar.position === "bottom") ? Style.marginS * scaling : undefined - rightMargin: !rAnchorCentered && rAnchorRight ? Style.marginS * scaling : undefined + rightMargin: !panelAnchorCentered && panelAnchorRight ? Style.marginS * scaling : undefined } scale: root.scaleValue