From 404a1d3e8bfacc84fe9d2e90f77422e1c8b22db9 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 8 Sep 2025 15:22:43 -0400 Subject: [PATCH] New icons + some warning fixes --- Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml | 8 ++--- Modules/Bar/Widgets/MediaMini.qml | 5 ++-- .../Notification/NotificationHistoryPanel.qml | 8 ++--- .../SettingsPanel/Bar/BarSectionEditor.qml | 2 +- Modules/SettingsPanel/SettingsPanel.qml | 30 +++++++++---------- Modules/SettingsPanel/Tabs/DisplayTab.qml | 2 +- .../Tabs/WallpaperSelectorTab.qml | 2 +- Modules/SidePanel/Cards/MediaCard.qml | 2 +- Modules/WiFiPanel/WiFiPanel.qml | 6 ++-- Services/FontService.qml | 24 +++++++++++++-- Widgets/NComboBox.qml | 2 +- Widgets/NImageCircled.qml | 5 ++-- Widgets/NImageRounded.qml | 5 ++-- Widgets/NInputAction.qml | 3 +- 14 files changed, 63 insertions(+), 41 deletions(-) diff --git a/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml b/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml index 9e4ec6a..cbe3886 100644 --- a/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml +++ b/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml @@ -44,7 +44,7 @@ NPanel { // Reset button (only show if update failed) NIconButton { visible: ArchUpdaterService.updateFailed - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Reset update state" sizeRatio: 0.8 colorBg: Color.mError @@ -245,7 +245,7 @@ NPanel { // Prominent refresh button NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Try checking again" sizeRatio: 1.2 colorBg: Color.mPrimary @@ -295,7 +295,7 @@ NPanel { // Prominent refresh button NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Refresh and try again" sizeRatio: 1.2 colorBg: Color.mPrimary @@ -483,7 +483,7 @@ NPanel { spacing: Style.marginL * scaling NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: ArchUpdaterService.aurBusy ? "Checking for updates..." : (!ArchUpdaterService.canPoll ? "Refresh available soon" : "Refresh package lists") onClicked: { ArchUpdaterService.forceRefresh() diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 141698a..9649a9a 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -134,7 +134,7 @@ RowLayout { NIcon { id: windowIcon - text: MediaService.isPlaying ? "pause" : "play_arrow" + text: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"] font.pointSize: Style.fontSizeL * scaling verticalAlignment: Text.AlignVCenter Layout.alignment: Qt.AlignVCenter @@ -154,7 +154,8 @@ RowLayout { id: trackArt anchors.fill: parent imagePath: MediaService.trackArtUrl - fallbackIcon: MediaService.isPlaying ? "pause" : "play_arrow" + fallbackIcon: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"] + fallbackIconSize: 10 * scaling borderWidth: 0 border.color: Color.transparent } diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index 0278ab9..d54cfb2 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -31,7 +31,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "notifications" + text: FontService.icons["bell"] font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } @@ -45,14 +45,14 @@ NPanel { } NIconButton { - icon: Settings.data.notifications.doNotDisturb ? "notifications_off" : "notifications_active" + icon: Settings.data.notifications.doNotDisturb ? FontService.icons["bell"] : FontService.icons["bell_striked"] tooltipText: Settings.data.notifications.doNotDisturb ? "'Do Not Disturb' is enabled." : "'Do Not Disturb' is disabled." sizeRatio: 0.8 onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb } NIconButton { - icon: "delete" + icon: FontService.icons["trash"] tooltipText: "Clear history" sizeRatio: 0.8 onClicked: NotificationService.clearHistory() @@ -175,7 +175,7 @@ NPanel { // Delete button NIconButton { - icon: "delete" + icon: FontService.icons["trash"] tooltipText: "Delete notification" sizeRatio: 0.7 Layout.alignment: Qt.AlignTop diff --git a/Modules/SettingsPanel/Bar/BarSectionEditor.qml b/Modules/SettingsPanel/Bar/BarSectionEditor.qml index 3d32950..c2a2631 100644 --- a/Modules/SettingsPanel/Bar/BarSectionEditor.qml +++ b/Modules/SettingsPanel/Bar/BarSectionEditor.qml @@ -170,7 +170,7 @@ NBox { Loader { active: BarWidgetRegistry.widgetHasUserSettings(modelData.id) sourceComponent: NIconButton { - icon: "settings" + icon: FontService.icons["gear"] sizeRatio: 0.6 colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBg: Color.mOnSurface diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index 622b2c7..7de6a1b 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -123,52 +123,52 @@ NPanel { let newTabs = [{ "id": SettingsPanel.Tab.General, "label": "General", - "icon": FontService.icons["general"], + "icon": "general", "source": generalTab }, { "id": SettingsPanel.Tab.Bar, "label": "Bar", - "icon": FontService.icons["bar"], + "icon": "bar", "source": barTab }, { "id": SettingsPanel.Tab.Launcher, "label": "Launcher", - "icon": FontService.icons["apps"], + "icon": "apps", "source": launcherTab }, { "id": SettingsPanel.Tab.Audio, "label": "Audio", - "icon": FontService.icons["volume_full"], + "icon": "volume_full", "source": audioTab }, { "id": SettingsPanel.Tab.Display, "label": "Display", - "icon": FontService.icons["monitor"], + "icon": "monitor", "source": displayTab }, { "id": SettingsPanel.Tab.Network, "label": "Network", - "icon": FontService.icons["ethernet"], + "icon": "ethernet", "source": networkTab }, { "id": SettingsPanel.Tab.Brightness, "label": "Brightness", - "icon": FontService.icons["brightness"], + "icon": "brightness", "source": brightnessTab }, { "id": SettingsPanel.Tab.Weather, "label": "Weather", - "icon": FontService.icons["partly_cloudy"], + "icon": "partly_cloudy", "source": weatherTab }, { "id": SettingsPanel.Tab.ColorScheme, "label": "Color Scheme", - "icon": FontService.icons["paint_bucket"], + "icon": "paint_bucket", "source": colorSchemeTab }, { "id": SettingsPanel.Tab.Wallpaper, "label": "Wallpaper", - "icon": FontService.icons["image"], + "icon": "image", "source": wallpaperTab }] @@ -177,7 +177,7 @@ NPanel { newTabs.push({ "id": SettingsPanel.Tab.WallpaperSelector, "label": "Wallpaper Selector", - "icon": FontService.icons["paint_brush"], + "icon": "paint_brush", "source": wallpaperSelectorTab }) } @@ -185,17 +185,17 @@ NPanel { newTabs.push({ "id": SettingsPanel.Tab.ScreenRecorder, "label": "Screen Recorder", - "icon": FontService.icons["video_camera"], + "icon": "video_camera", "source": screenRecorderTab }, { "id": SettingsPanel.Tab.Hooks, "label": "Hooks", - "icon": FontService.icons["cable"], + "icon": "cable", "source": hooksTab }, { "id": SettingsPanel.Tab.About, "label": "About", - "icon": FontService.icons["info"], + "icon": "info", "source": aboutTab }) @@ -404,7 +404,7 @@ NPanel { // Tab icon NIcon { - text: modelData.icon + text: FontService.icons[modelData.icon] color: tabTextColor font.pointSize: Style.fontSizeL * scaling } diff --git a/Modules/SettingsPanel/Tabs/DisplayTab.qml b/Modules/SettingsPanel/Tabs/DisplayTab.qml index 9a5c4e3..36f6643 100644 --- a/Modules/SettingsPanel/Tabs/DisplayTab.qml +++ b/Modules/SettingsPanel/Tabs/DisplayTab.qml @@ -181,7 +181,7 @@ ColumnLayout { } NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Reset scaling" onClicked: ScalingService.setScreenScale(modelData, 1.0) } diff --git a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml index 6952c71..0036a64 100644 --- a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml +++ b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml @@ -96,7 +96,7 @@ ColumnLayout { } NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Refresh wallpaper list" onClicked: { WallpaperService.refreshWallpapersList() diff --git a/Modules/SidePanel/Cards/MediaCard.qml b/Modules/SidePanel/Cards/MediaCard.qml index 65f7211..a28f83a 100644 --- a/Modules/SidePanel/Cards/MediaCard.qml +++ b/Modules/SidePanel/Cards/MediaCard.qml @@ -315,7 +315,7 @@ NBox { // Play/Pause button NIconButton { - icon: MediaService.isPlaying ? "pause" : "play_arrow" + icon: MediaService.isPlaying ? FontService.icons["pause"] : FontService.icons["play"] tooltipText: MediaService.isPlaying ? "Pause" : "Play" visible: (MediaService.canPlay || MediaService.canPause) onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {} diff --git a/Modules/WiFiPanel/WiFiPanel.qml b/Modules/WiFiPanel/WiFiPanel.qml index db4e21a..e4fccc8 100644 --- a/Modules/WiFiPanel/WiFiPanel.qml +++ b/Modules/WiFiPanel/WiFiPanel.qml @@ -55,7 +55,7 @@ NPanel { } NIconButton { - icon: "refresh" + icon: FontService.icons["refresh"] tooltipText: "Refresh" sizeRatio: 0.8 enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning @@ -377,7 +377,7 @@ NPanel { && NetworkService.connectingTo !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid - icon: "delete" + icon: FontService.icons["trash"] tooltipText: "Forget network" sizeRatio: 0.7 onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid @@ -586,7 +586,7 @@ NPanel { NButton { text: "Scan again" - icon: "refresh" + icon: FontService.icons["refresh"] Layout.alignment: Qt.AlignHCenter onClicked: NetworkService.scan() } diff --git a/Services/FontService.qml b/Services/FontService.qml index d1a5cf3..46ef26c 100644 --- a/Services/FontService.qml +++ b/Services/FontService.qml @@ -35,14 +35,14 @@ Singleton { "check": "\uf00C", "panel": "\uF28C", "memory": "\uF2D6", - "bell": "\uF189", + "trash": "\uF014", "image": "\uF03E", "refresh": "\uF021", "video_camera": "\uF03D", "ethernet": "\uEF09", "speed": "\uEEB2", - "leaf": "\uEE34", + "leaf": "\uF06C", "microphone": "\uED03", "coffee": "\uef59", "thermometer": "\uE350", @@ -50,7 +50,25 @@ Singleton { "skull": "\uEE15", "paint_brush": "\uEE26", "paint_bucket": "\uEE3F", - "yin_yang": "\uEEE9" + "yin_yang": "\uEEE9", + "record": "\uEFFA", + "pause": "\uF04C", + "play": "\uF04B", + "stop": "\uEFFB", + "next": "\uF051", + "prev": "\uF048", + "paint_drop": "\uF043", + "lightning": "\uF0E7", + "brightness": "\uF0A3", + "arrow_drop_down": "\uF0D7", + + "vinyl": "\uEFBD", + "bell": "\uF189", + "bell_striked": "\uEE15", // FIXME + "drive": "\uEE15", // FIXME + "upload": "\uEE15", // FIXME + "download": "\uEE15", // FIXME + } // ------------------------------------------- diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index 57bc0bb..842479c 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -85,7 +85,7 @@ RowLayout { indicator: NIcon { x: combo.width - width - Style.marginM * scaling y: combo.topPadding + (combo.availableHeight - height) / 2 - text: "arrow_drop_down" + text: FontService.icons["arrow_drop_down"] font.pointSize: Style.fontSizeXXL * scaling } diff --git a/Widgets/NImageCircled.qml b/Widgets/NImageCircled.qml index 7279c08..0c95178 100644 --- a/Widgets/NImageCircled.qml +++ b/Widgets/NImageCircled.qml @@ -9,9 +9,10 @@ Rectangle { id: root property string imagePath: "" - property string fallbackIcon: "" property color borderColor: Color.transparent property real borderWidth: 0 + property string fallbackIcon: "" + property real fallbackIconSize: Style.fontSizeXXL * scaling color: Color.transparent radius: parent.width * 0.5 @@ -54,7 +55,7 @@ Rectangle { NIcon { anchors.centerIn: parent text: fallbackIcon - font.pointSize: Style.fontSizeXXL * scaling + font.pointSize: fallbackIconSize visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "") z: 0 } diff --git a/Widgets/NImageRounded.qml b/Widgets/NImageRounded.qml index 76654fc..c2c8b94 100644 --- a/Widgets/NImageRounded.qml +++ b/Widgets/NImageRounded.qml @@ -9,10 +9,11 @@ Rectangle { id: root property string imagePath: "" - property string fallbackIcon: "" property color borderColor: Color.transparent property real borderWidth: 0 property real imageRadius: width * 0.5 + property string fallbackIcon: "" + property real fallbackIconSize: Style.fontSizeXXL * scaling property real scaledRadius: imageRadius * Settings.data.general.radiusRatio @@ -74,7 +75,7 @@ Rectangle { NIcon { anchors.centerIn: parent text: fallbackIcon - font.pointSize: Style.fontSizeXXL * scaling + font.pointSize: fallbackIconSize visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "") z: 0 } diff --git a/Widgets/NInputAction.qml b/Widgets/NInputAction.qml index 785b5b0..b48264b 100644 --- a/Widgets/NInputAction.qml +++ b/Widgets/NInputAction.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Layouts import qs.Commons import qs.Widgets +import qs.Services // Input and button row RowLayout { @@ -13,7 +14,7 @@ RowLayout { property string placeholderText: "" property string text: "" property string actionButtonText: "Test" - property string actionButtonIcon: "play_arrow" + property string actionButtonIcon: FontService.icons["play"] property bool actionButtonEnabled: text !== "" // Signals