New icons + some warning fixes

This commit is contained in:
LemmyCook 2025-09-08 15:22:43 -04:00
parent 6f1b88e76d
commit 404a1d3e8b
14 changed files with 63 additions and 41 deletions

View file

@ -44,7 +44,7 @@ NPanel {
// Reset button (only show if update failed) // Reset button (only show if update failed)
NIconButton { NIconButton {
visible: ArchUpdaterService.updateFailed visible: ArchUpdaterService.updateFailed
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Reset update state" tooltipText: "Reset update state"
sizeRatio: 0.8 sizeRatio: 0.8
colorBg: Color.mError colorBg: Color.mError
@ -245,7 +245,7 @@ NPanel {
// Prominent refresh button // Prominent refresh button
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Try checking again" tooltipText: "Try checking again"
sizeRatio: 1.2 sizeRatio: 1.2
colorBg: Color.mPrimary colorBg: Color.mPrimary
@ -295,7 +295,7 @@ NPanel {
// Prominent refresh button // Prominent refresh button
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Refresh and try again" tooltipText: "Refresh and try again"
sizeRatio: 1.2 sizeRatio: 1.2
colorBg: Color.mPrimary colorBg: Color.mPrimary
@ -483,7 +483,7 @@ NPanel {
spacing: Style.marginL * scaling spacing: Style.marginL * scaling
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: ArchUpdaterService.aurBusy ? "Checking for updates..." : (!ArchUpdaterService.canPoll ? "Refresh available soon" : "Refresh package lists") tooltipText: ArchUpdaterService.aurBusy ? "Checking for updates..." : (!ArchUpdaterService.canPoll ? "Refresh available soon" : "Refresh package lists")
onClicked: { onClicked: {
ArchUpdaterService.forceRefresh() ArchUpdaterService.forceRefresh()

View file

@ -134,7 +134,7 @@ RowLayout {
NIcon { NIcon {
id: windowIcon id: windowIcon
text: MediaService.isPlaying ? "pause" : "play_arrow" text: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"]
font.pointSize: Style.fontSizeL * scaling font.pointSize: Style.fontSizeL * scaling
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
@ -154,7 +154,8 @@ RowLayout {
id: trackArt id: trackArt
anchors.fill: parent anchors.fill: parent
imagePath: MediaService.trackArtUrl imagePath: MediaService.trackArtUrl
fallbackIcon: MediaService.isPlaying ? "pause" : "play_arrow" fallbackIcon: MediaService.isPlaying ? FontService.icons["pause"]: FontService.icons["play"]
fallbackIconSize: 10 * scaling
borderWidth: 0 borderWidth: 0
border.color: Color.transparent border.color: Color.transparent
} }

View file

@ -31,7 +31,7 @@ NPanel {
spacing: Style.marginM * scaling spacing: Style.marginM * scaling
NIcon { NIcon {
text: "notifications" text: FontService.icons["bell"]
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary color: Color.mPrimary
} }
@ -45,14 +45,14 @@ NPanel {
} }
NIconButton { 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." tooltipText: Settings.data.notifications.doNotDisturb ? "'Do Not Disturb' is enabled." : "'Do Not Disturb' is disabled."
sizeRatio: 0.8 sizeRatio: 0.8
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
} }
NIconButton { NIconButton {
icon: "delete" icon: FontService.icons["trash"]
tooltipText: "Clear history" tooltipText: "Clear history"
sizeRatio: 0.8 sizeRatio: 0.8
onClicked: NotificationService.clearHistory() onClicked: NotificationService.clearHistory()
@ -175,7 +175,7 @@ NPanel {
// Delete button // Delete button
NIconButton { NIconButton {
icon: "delete" icon: FontService.icons["trash"]
tooltipText: "Delete notification" tooltipText: "Delete notification"
sizeRatio: 0.7 sizeRatio: 0.7
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop

View file

@ -170,7 +170,7 @@ NBox {
Loader { Loader {
active: BarWidgetRegistry.widgetHasUserSettings(modelData.id) active: BarWidgetRegistry.widgetHasUserSettings(modelData.id)
sourceComponent: NIconButton { sourceComponent: NIconButton {
icon: "settings" icon: FontService.icons["gear"]
sizeRatio: 0.6 sizeRatio: 0.6
colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight)
colorBg: Color.mOnSurface colorBg: Color.mOnSurface

View file

@ -123,52 +123,52 @@ NPanel {
let newTabs = [{ let newTabs = [{
"id": SettingsPanel.Tab.General, "id": SettingsPanel.Tab.General,
"label": "General", "label": "General",
"icon": FontService.icons["general"], "icon": "general",
"source": generalTab "source": generalTab
}, { }, {
"id": SettingsPanel.Tab.Bar, "id": SettingsPanel.Tab.Bar,
"label": "Bar", "label": "Bar",
"icon": FontService.icons["bar"], "icon": "bar",
"source": barTab "source": barTab
}, { }, {
"id": SettingsPanel.Tab.Launcher, "id": SettingsPanel.Tab.Launcher,
"label": "Launcher", "label": "Launcher",
"icon": FontService.icons["apps"], "icon": "apps",
"source": launcherTab "source": launcherTab
}, { }, {
"id": SettingsPanel.Tab.Audio, "id": SettingsPanel.Tab.Audio,
"label": "Audio", "label": "Audio",
"icon": FontService.icons["volume_full"], "icon": "volume_full",
"source": audioTab "source": audioTab
}, { }, {
"id": SettingsPanel.Tab.Display, "id": SettingsPanel.Tab.Display,
"label": "Display", "label": "Display",
"icon": FontService.icons["monitor"], "icon": "monitor",
"source": displayTab "source": displayTab
}, { }, {
"id": SettingsPanel.Tab.Network, "id": SettingsPanel.Tab.Network,
"label": "Network", "label": "Network",
"icon": FontService.icons["ethernet"], "icon": "ethernet",
"source": networkTab "source": networkTab
}, { }, {
"id": SettingsPanel.Tab.Brightness, "id": SettingsPanel.Tab.Brightness,
"label": "Brightness", "label": "Brightness",
"icon": FontService.icons["brightness"], "icon": "brightness",
"source": brightnessTab "source": brightnessTab
}, { }, {
"id": SettingsPanel.Tab.Weather, "id": SettingsPanel.Tab.Weather,
"label": "Weather", "label": "Weather",
"icon": FontService.icons["partly_cloudy"], "icon": "partly_cloudy",
"source": weatherTab "source": weatherTab
}, { }, {
"id": SettingsPanel.Tab.ColorScheme, "id": SettingsPanel.Tab.ColorScheme,
"label": "Color Scheme", "label": "Color Scheme",
"icon": FontService.icons["paint_bucket"], "icon": "paint_bucket",
"source": colorSchemeTab "source": colorSchemeTab
}, { }, {
"id": SettingsPanel.Tab.Wallpaper, "id": SettingsPanel.Tab.Wallpaper,
"label": "Wallpaper", "label": "Wallpaper",
"icon": FontService.icons["image"], "icon": "image",
"source": wallpaperTab "source": wallpaperTab
}] }]
@ -177,7 +177,7 @@ NPanel {
newTabs.push({ newTabs.push({
"id": SettingsPanel.Tab.WallpaperSelector, "id": SettingsPanel.Tab.WallpaperSelector,
"label": "Wallpaper Selector", "label": "Wallpaper Selector",
"icon": FontService.icons["paint_brush"], "icon": "paint_brush",
"source": wallpaperSelectorTab "source": wallpaperSelectorTab
}) })
} }
@ -185,17 +185,17 @@ NPanel {
newTabs.push({ newTabs.push({
"id": SettingsPanel.Tab.ScreenRecorder, "id": SettingsPanel.Tab.ScreenRecorder,
"label": "Screen Recorder", "label": "Screen Recorder",
"icon": FontService.icons["video_camera"], "icon": "video_camera",
"source": screenRecorderTab "source": screenRecorderTab
}, { }, {
"id": SettingsPanel.Tab.Hooks, "id": SettingsPanel.Tab.Hooks,
"label": "Hooks", "label": "Hooks",
"icon": FontService.icons["cable"], "icon": "cable",
"source": hooksTab "source": hooksTab
}, { }, {
"id": SettingsPanel.Tab.About, "id": SettingsPanel.Tab.About,
"label": "About", "label": "About",
"icon": FontService.icons["info"], "icon": "info",
"source": aboutTab "source": aboutTab
}) })
@ -404,7 +404,7 @@ NPanel {
// Tab icon // Tab icon
NIcon { NIcon {
text: modelData.icon text: FontService.icons[modelData.icon]
color: tabTextColor color: tabTextColor
font.pointSize: Style.fontSizeL * scaling font.pointSize: Style.fontSizeL * scaling
} }

View file

@ -181,7 +181,7 @@ ColumnLayout {
} }
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Reset scaling" tooltipText: "Reset scaling"
onClicked: ScalingService.setScreenScale(modelData, 1.0) onClicked: ScalingService.setScreenScale(modelData, 1.0)
} }

View file

@ -96,7 +96,7 @@ ColumnLayout {
} }
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Refresh wallpaper list" tooltipText: "Refresh wallpaper list"
onClicked: { onClicked: {
WallpaperService.refreshWallpapersList() WallpaperService.refreshWallpapersList()

View file

@ -315,7 +315,7 @@ NBox {
// Play/Pause button // Play/Pause button
NIconButton { NIconButton {
icon: MediaService.isPlaying ? "pause" : "play_arrow" icon: MediaService.isPlaying ? FontService.icons["pause"] : FontService.icons["play"]
tooltipText: MediaService.isPlaying ? "Pause" : "Play" tooltipText: MediaService.isPlaying ? "Pause" : "Play"
visible: (MediaService.canPlay || MediaService.canPause) visible: (MediaService.canPlay || MediaService.canPause)
onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {} onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {}

View file

@ -55,7 +55,7 @@ NPanel {
} }
NIconButton { NIconButton {
icon: "refresh" icon: FontService.icons["refresh"]
tooltipText: "Refresh" tooltipText: "Refresh"
sizeRatio: 0.8 sizeRatio: 0.8
enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning
@ -377,7 +377,7 @@ NPanel {
&& NetworkService.connectingTo !== modelData.ssid && NetworkService.connectingTo !== modelData.ssid
&& NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid
&& NetworkService.disconnectingFrom !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid
icon: "delete" icon: FontService.icons["trash"]
tooltipText: "Forget network" tooltipText: "Forget network"
sizeRatio: 0.7 sizeRatio: 0.7
onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid
@ -586,7 +586,7 @@ NPanel {
NButton { NButton {
text: "Scan again" text: "Scan again"
icon: "refresh" icon: FontService.icons["refresh"]
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
onClicked: NetworkService.scan() onClicked: NetworkService.scan()
} }

View file

@ -35,14 +35,14 @@ Singleton {
"check": "\uf00C", "check": "\uf00C",
"panel": "\uF28C", "panel": "\uF28C",
"memory": "\uF2D6", "memory": "\uF2D6",
"bell": "\uF189",
"trash": "\uF014", "trash": "\uF014",
"image": "\uF03E", "image": "\uF03E",
"refresh": "\uF021", "refresh": "\uF021",
"video_camera": "\uF03D", "video_camera": "\uF03D",
"ethernet": "\uEF09", "ethernet": "\uEF09",
"speed": "\uEEB2", "speed": "\uEEB2",
"leaf": "\uEE34", "leaf": "\uF06C",
"microphone": "\uED03", "microphone": "\uED03",
"coffee": "\uef59", "coffee": "\uef59",
"thermometer": "\uE350", "thermometer": "\uE350",
@ -50,7 +50,25 @@ Singleton {
"skull": "\uEE15", "skull": "\uEE15",
"paint_brush": "\uEE26", "paint_brush": "\uEE26",
"paint_bucket": "\uEE3F", "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
} }
// ------------------------------------------- // -------------------------------------------

View file

@ -85,7 +85,7 @@ RowLayout {
indicator: NIcon { indicator: NIcon {
x: combo.width - width - Style.marginM * scaling x: combo.width - width - Style.marginM * scaling
y: combo.topPadding + (combo.availableHeight - height) / 2 y: combo.topPadding + (combo.availableHeight - height) / 2
text: "arrow_drop_down" text: FontService.icons["arrow_drop_down"]
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * scaling
} }

View file

@ -9,9 +9,10 @@ Rectangle {
id: root id: root
property string imagePath: "" property string imagePath: ""
property string fallbackIcon: ""
property color borderColor: Color.transparent property color borderColor: Color.transparent
property real borderWidth: 0 property real borderWidth: 0
property string fallbackIcon: ""
property real fallbackIconSize: Style.fontSizeXXL * scaling
color: Color.transparent color: Color.transparent
radius: parent.width * 0.5 radius: parent.width * 0.5
@ -54,7 +55,7 @@ Rectangle {
NIcon { NIcon {
anchors.centerIn: parent anchors.centerIn: parent
text: fallbackIcon text: fallbackIcon
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: fallbackIconSize
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "") visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
z: 0 z: 0
} }

View file

@ -9,10 +9,11 @@ Rectangle {
id: root id: root
property string imagePath: "" property string imagePath: ""
property string fallbackIcon: ""
property color borderColor: Color.transparent property color borderColor: Color.transparent
property real borderWidth: 0 property real borderWidth: 0
property real imageRadius: width * 0.5 property real imageRadius: width * 0.5
property string fallbackIcon: ""
property real fallbackIconSize: Style.fontSizeXXL * scaling
property real scaledRadius: imageRadius * Settings.data.general.radiusRatio property real scaledRadius: imageRadius * Settings.data.general.radiusRatio
@ -74,7 +75,7 @@ Rectangle {
NIcon { NIcon {
anchors.centerIn: parent anchors.centerIn: parent
text: fallbackIcon text: fallbackIcon
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: fallbackIconSize
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "") visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
z: 0 z: 0
} }

View file

@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import qs.Commons import qs.Commons
import qs.Widgets import qs.Widgets
import qs.Services
// Input and button row // Input and button row
RowLayout { RowLayout {
@ -13,7 +14,7 @@ RowLayout {
property string placeholderText: "" property string placeholderText: ""
property string text: "" property string text: ""
property string actionButtonText: "Test" property string actionButtonText: "Test"
property string actionButtonIcon: "play_arrow" property string actionButtonIcon: FontService.icons["play"]
property bool actionButtonEnabled: text !== "" property bool actionButtonEnabled: text !== ""
// Signals // Signals