From 08d2747f1ef63a0dd2d2ea5d32e7b1474ef42313 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 8 Sep 2025 16:08:36 -0400 Subject: [PATCH] Icons: color picker + better tab alignment in settings + autoformatting --- Modules/Bar/Widgets/MediaMini.qml | 4 ++-- .../SettingsPanel/Bar/BarWidgetSettingsDialog.qml | 2 +- Modules/SettingsPanel/SettingsPanel.qml | 15 +++++++++++---- Services/FontService.qml | 12 +++++++----- Widgets/NColorPicker.qml | 3 ++- Widgets/NColorPickerDialog.qml | 3 ++- Widgets/NSpinBox.qml | 4 ++-- Widgets/NToast.qml | 2 +- 8 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 9649a9a..a620f32 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -134,7 +134,7 @@ RowLayout { NIcon { id: windowIcon - text: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"] + text: MediaService.isPlaying ? FontService.icons["pause"] : FontService.icons["play"] font.pointSize: Style.fontSizeL * scaling verticalAlignment: Text.AlignVCenter Layout.alignment: Qt.AlignVCenter @@ -154,7 +154,7 @@ RowLayout { id: trackArt anchors.fill: parent imagePath: MediaService.trackArtUrl - fallbackIcon: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"] + fallbackIcon: MediaService.isPlaying ? FontService.icons["pause"] : FontService.icons["play"] fallbackIconSize: 10 * scaling borderWidth: 0 border.color: Color.transparent diff --git a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml index 51ebc09..d7753e8 100644 --- a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml +++ b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml @@ -108,7 +108,7 @@ Popup { Layout.fillWidth: true Layout.topMargin: Style.marginM * scaling spacing: Style.marginM * scaling - + Item { Layout.fillWidth: true } diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index 69908f5..af8a524 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -403,10 +403,17 @@ NPanel { spacing: Style.marginS * scaling // Tab icon - NIcon { - text: FontService.icons[modelData.icon] - color: tabTextColor - font.pointSize: Style.fontSizeL * scaling + Rectangle { + color: Color.transparent + width: 20 * scaling + height: 20 * scaling + + NIcon { + text: FontService.icons[modelData.icon] + color: tabTextColor + font.pointSize: Style.fontSizeL * scaling + anchors.fill: parent + } } // Tab label diff --git a/Services/FontService.qml b/Services/FontService.qml index 1049adf..9d228bc 100644 --- a/Services/FontService.qml +++ b/Services/FontService.qml @@ -70,12 +70,14 @@ Singleton { "link": "\uF0C1", "plus": "\uF067", "minus": "\uF068", + "eyedropper": "\uF342", "bell": "\uF189", - "bell_striked": "\uEE15", // FIXME - "drive": "\uEE15", // FIXME - "person": "\uEE15", // FIXME - - + "bell_striked": "\uEE15", + "drive"// FIXME + : "\uEE15", + "person"// FIXME + : "\uEE15" + // FIXME } // ------------------------------------------- diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index 830ba84..a4a4aad 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import qs.Commons +import qs.Services import qs.Widgets Rectangle { @@ -58,7 +59,7 @@ Rectangle { } NIcon { - text: "palette" + text: FontService.icons["eyedropper"] color: Color.mOnSurfaceVariant } } diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 2bcb395..cb8db1c 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import qs.Commons +import qs.Services import qs.Widgets Popup { @@ -129,7 +130,7 @@ Popup { spacing: Style.marginS * scaling NIcon { - text: "palette" + text: FontService.icons["eyedropper"] font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 77693b7..a3cb3e3 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -95,7 +95,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: FontService.icons["minus"] + text: FontService.icons["minus"] font.pointSize: Style.fontSizeS * scaling color: decreaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary } @@ -130,7 +130,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: FontService.icons["plus"] + text: FontService.icons["plus"] font.pointSize: Style.fontSizeS * scaling color: increaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary } diff --git a/Widgets/NToast.qml b/Widgets/NToast.qml index 8fc882d..4a544d1 100644 --- a/Widgets/NToast.qml +++ b/Widgets/NToast.qml @@ -118,7 +118,7 @@ Item { // Icon NIcon { id: icon - text: (root.type == "warning") ? FontService.icons["warning"] : FontService.icons["info"] + text: (root.type == "warning") ? FontService.icons["warning"] : FontService.icons["info"] color: { switch (root.type) { case "warning":