From a1b6c0845dee9ff0b7e71883b7328a39456858a0 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Wed, 13 Aug 2025 17:22:42 -0400 Subject: [PATCH] Replace some hardcoded spacing by their respective shorthands --- Modules/Bar/Tray.qml | 4 ++-- Modules/Bar/TrayMenu.qml | 8 ++++---- Modules/Demo/DemoPanel.qml | 4 ++-- Modules/Settings/Tabs/About.qml | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Modules/Bar/Tray.qml b/Modules/Bar/Tray.qml index 4ed0114..e35a7ac 100644 --- a/Modules/Bar/Tray.qml +++ b/Modules/Bar/Tray.qml @@ -32,8 +32,8 @@ Item { IconImage { id: trayIcon anchors.centerIn: parent - width: 16 * scaling - height: 16 * scaling + width: Style.marginLarge * scaling + height: Style.marginLarge * scaling smooth: false asynchronous: true backer.fillMode: Image.PreserveAspectFit diff --git a/Modules/Bar/TrayMenu.qml b/Modules/Bar/TrayMenu.qml index 75073d6..b7dc336 100644 --- a/Modules/Bar/TrayMenu.qml +++ b/Modules/Bar/TrayMenu.qml @@ -134,8 +134,8 @@ PopupWindow { } Image { - Layout.preferredWidth: 16 * scaling - Layout.preferredHeight: 16 * scaling + Layout.preferredWidth: Style.marginLarge * scaling + Layout.preferredHeight: Style.marginLarge * scaling source: modelData?.icon ?? "" visible: (modelData?.icon ?? "") !== "" fillMode: Image.PreserveAspectFit @@ -369,8 +369,8 @@ PopupWindow { } Image { - Layout.preferredWidth: 16 * scaling - Layout.preferredHeight: 16 * scaling + Layout.preferredWidth: Style.marginLarge * scaling + Layout.preferredHeight: Style.marginLarge * scaling source: modelData?.icon ?? "" visible: (modelData?.icon ?? "") !== "" fillMode: Image.PreserveAspectFit diff --git a/Modules/Demo/DemoPanel.qml b/Modules/Demo/DemoPanel.qml index d16bd09..799fbc6 100644 --- a/Modules/Demo/DemoPanel.qml +++ b/Modules/Demo/DemoPanel.qml @@ -127,7 +127,7 @@ NLoader { // NSlider ColumnLayout { - spacing: 16 * scaling + spacing: Style.marginLarge * scaling NText { text: "Scaling" color: Colors.accentSecondary @@ -170,7 +170,7 @@ NLoader { // NIconButton ColumnLayout { - spacing: 16 * scaling + spacing: Style.marginLarge * scaling NText { text: "NIconButton" color: Colors.accentSecondary diff --git a/Modules/Settings/Tabs/About.qml b/Modules/Settings/Tabs/About.qml index 574f219..88f143c 100644 --- a/Modules/Settings/Tabs/About.qml +++ b/Modules/Settings/Tabs/About.qml @@ -69,7 +69,7 @@ ColumnLayout { font.pointSize: 14 * Scaling.scale(screen) color: Colors.textSecondary Layout.alignment: Qt.AlignCenter - Layout.bottomMargin: 16 * Scaling.scale(screen) + Layout.bottomMargin: Style.marginLarge * scaling.scale(screen) } GridLayout { @@ -80,28 +80,28 @@ ColumnLayout { NText { text: "Latest Version:" - font.pointSize: 16 * Scaling.scale(screen) + font.pointSize: Style.marginLarge * scaling.scale(screen) color: Colors.textSecondary Layout.alignment: Qt.AlignRight } NText { text: root.latestVersion - font.pointSize: 16 * Scaling.scale(screen) + font.pointSize: Style.marginLarge * scaling.scale(screen) color: Colors.textPrimary font.weight: Style.fontWeightBold } NText { text: "Installed Version:" - font.pointSize: 16 * Scaling.scale(screen) + font.pointSize: Style.marginLarge * scaling.scale(screen) color: Colors.textSecondary Layout.alignment: Qt.AlignRight } NText { text: root.currentVersion - font.pointSize: 16 * Scaling.scale(screen) + font.pointSize: Style.marginLarge * scaling.scale(screen) color: Colors.textPrimary font.weight: Style.fontWeightBold }