From c00e1f7fb36819627c3047b280c7b809d3ef0c2b Mon Sep 17 00:00:00 2001 From: quadbyte Date: Tue, 12 Aug 2025 17:20:14 -0400 Subject: [PATCH] Settings cleanup/scaling --- Modules/Settings/Tabs/Bar.qml | 22 +++---- Modules/Settings/Tabs/General.qml | 51 ++++++---------- Modules/Settings/Tabs/ScreenRecorder.qml | 78 ++++++++++-------------- Services/Settings.qml | 1 - Widgets/NTextInput.qml | 2 +- 5 files changed, 56 insertions(+), 98 deletions(-) diff --git a/Modules/Settings/Tabs/Bar.qml b/Modules/Settings/Tabs/Bar.qml index b9b4406..bcac604 100644 --- a/Modules/Settings/Tabs/Bar.qml +++ b/Modules/Settings/Tabs/Bar.qml @@ -14,8 +14,7 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - padding: 16 - rightPadding: 12 + padding: Style.marginMedium * scaling clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AsNeeded @@ -30,29 +29,22 @@ ColumnLayout { } ColumnLayout { - spacing: 4 + spacing: Style.marginMedium * scaling Layout.fillWidth: true NText { - text: "Bar Settings" - font.pointSize: 18 + text: "Components" + font.pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } // Elements section ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 - - NText { - text: "Elements" - font.pointSize: 13 - font.weight: Style.fontWeightBold - color: Colors.textPrimary - } + Layout.topMargin: Style.marginSmall * scaling NToggle { label: "Show Active Window" diff --git a/Modules/Settings/Tabs/General.qml b/Modules/Settings/Tabs/General.qml index 9e4e08f..f0ed6f0 100644 --- a/Modules/Settings/Tabs/General.qml +++ b/Modules/Settings/Tabs/General.qml @@ -14,8 +14,7 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - padding: 16 - rightPadding: 12 + padding: Style.marginMedium * scaling clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AsNeeded @@ -30,38 +29,31 @@ ColumnLayout { } ColumnLayout { - spacing: 4 + spacing: Style.marginTiny * scaling Layout.fillWidth: true NText { text: "General Settings" - font.pointSize: 18 + font.pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } // Profile section ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 - - NText { - text: "Profile" - font.pointSize: 13 - font.weight: Style.fontWeightBold - color: Colors.textPrimary - } + Layout.topMargin: Style.marginSmall * scaling RowLayout { Layout.fillWidth: true - spacing: 16 + spacing: Style.marginLarge * scaling // Avatar preview NImageRounded { - width: 64 - height: 64 + width: 64 * scaling + height: 64 * scaling imagePath: Settings.data.general.avatarImage fallbackIcon: "person" borderColor: Colors.accentPrimary @@ -69,16 +61,16 @@ ColumnLayout { } ColumnLayout { Layout.fillWidth: true - spacing: 4 + spacing: Style.marginTiny * scaling NText { - text: "Profile Image" + text: "Profile Picture" color: Colors.textPrimary font.weight: Style.fontWeightBold } NText { text: "Your profile picture displayed in various places throughout the shell" color: Colors.textSecondary - font.pointSize: 12 + font.pointSize: Style.fontSizeSmall * scaling } NTextInput { text: Settings.data.general.avatarImage @@ -95,20 +87,20 @@ ColumnLayout { NDivider { Layout.fillWidth: true - Layout.topMargin: 26 - Layout.bottomMargin: 18 + Layout.topMargin: Style.marginLarge * 2 * scaling + Layout.bottomMargin: Style.marginLarge * scaling } ColumnLayout { - spacing: 4 + spacing: Style.marginMedium * scaling Layout.fillWidth: true NText { text: "User Interface" - font.pointSize: 18 + font.pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } NToggle { @@ -120,15 +112,6 @@ ColumnLayout { } } - NToggle { - label: "Show Dock" - description: "Display a dock at the bottom of the screen for quick access to applications" - value: Settings.data.general.showDock - onToggled: function (v) { - Settings.data.general.showDock = v - } - } - NToggle { label: "Dim Desktop" description: "Dim the desktop when panels or menus are open" diff --git a/Modules/Settings/Tabs/ScreenRecorder.qml b/Modules/Settings/Tabs/ScreenRecorder.qml index 991e34b..7aa1e77 100644 --- a/Modules/Settings/Tabs/ScreenRecorder.qml +++ b/Modules/Settings/Tabs/ScreenRecorder.qml @@ -14,8 +14,7 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - padding: 16 - rightPadding: 12 + padding: Style.marginMedium * scaling clip: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AsNeeded @@ -30,22 +29,22 @@ ColumnLayout { } ColumnLayout { - spacing: 4 + spacing: Style.marginTiny * scaling Layout.fillWidth: true NText { text: "Screen Recording" - font.pointSize: 18 + font.pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } // Output Directory ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Output Directory" @@ -73,8 +72,8 @@ ColumnLayout { NDivider { Layout.fillWidth: true - Layout.topMargin: 26 - Layout.bottomMargin: 18 + Layout.topMargin: Style.marginLarge * 2 * scaling + Layout.bottomMargin: Style.marginLarge * scaling } // Video Settings @@ -84,17 +83,17 @@ ColumnLayout { NText { text: "Video Settings" - font.pointSize: 18 + font.pointSize: Style.fontSizeXL * scaling font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } // Frame Rate ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Frame Rate" @@ -111,36 +110,21 @@ ColumnLayout { Layout.fillWidth: true } - RowLayout { - Layout.fillWidth: true - - NText { - text: Settings.data.screenRecorder.frameRate + " FPS" - font.pointSize: 13 - color: Colors.textPrimary + NComboBox { + optionsKeys: ["30", "60", "120", "240"] + optionsLabels: ["30 FPS", "60 FPS", "120 FPS", "240 FPS"] + currentKey: Settings.data.screenRecorder.frameRate + onSelected: function (key) { + Settings.data.screenRecorder.frameRate = key } - - Item { - Layout.fillWidth: true - } - } - - NSlider { - Layout.fillWidth: true - from: 24 - to: 144 - stepSize: 1 - value: Settings.data.screenRecorder.frameRate - onPressedChanged: Settings.data.screenRecorder.frameRate = Math.round(value) - cutoutColor: Colors.backgroundPrimary } } // Video Quality ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Video Quality" @@ -171,7 +155,7 @@ ColumnLayout { ColumnLayout { spacing: 8 Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Video Codec" @@ -200,9 +184,9 @@ ColumnLayout { // Color Range ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Color Range" @@ -232,13 +216,13 @@ ColumnLayout { NDivider { Layout.fillWidth: true - Layout.topMargin: 26 - Layout.bottomMargin: 18 + Layout.topMargin: Style.marginLarge * 2 * scaling + Layout.bottomMargin: Style.marginLarge * scaling } // Audio Settings ColumnLayout { - spacing: 4 + spacing: Style.spacingTiny * scaling Layout.fillWidth: true NText { @@ -246,14 +230,14 @@ ColumnLayout { font.pointSize: 18 font.weight: Style.fontWeightBold color: Colors.textPrimary - Layout.bottomMargin: 8 + Layout.bottomMargin: Style.marginSmall * scaling } // Audio Source ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Audio Source" @@ -282,9 +266,9 @@ ColumnLayout { // Audio Codec ColumnLayout { - spacing: 8 + spacing: Style.marginSmall * scaling Layout.fillWidth: true - Layout.topMargin: 8 + Layout.topMargin: Style.marginSmall * scaling NText { text: "Audio Codec" diff --git a/Services/Settings.qml b/Services/Settings.qml index a732496..39df007 100644 --- a/Services/Settings.qml +++ b/Services/Settings.qml @@ -82,7 +82,6 @@ Singleton { property string avatarImage: defaultAvatar property bool dimDesktop: true property bool showScreenCorners: false - property bool showDock: false } // location diff --git a/Widgets/NTextInput.qml b/Widgets/NTextInput.qml index cceadcf..2787b90 100644 --- a/Widgets/NTextInput.qml +++ b/Widgets/NTextInput.qml @@ -17,8 +17,8 @@ Item { signal editingFinished // Sizing - implicitHeight: Style.baseWidgetSize * 1.25 * scaling implicitWidth: 320 * scaling + implicitHeight: Style.baseWidgetSize * 1.25 * scaling // Container Rectangle {