From 1f8c55d581d45ebeab5e8f7eb99e23682333f11a Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 8 Sep 2025 22:05:57 -0400 Subject: [PATCH] Icons: huge cleanup --- Commons/Bootstrap.qml | 15 ++--------- Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml | 26 +++++++++---------- Modules/Bar/Widgets/Bluetooth.qml | 2 +- Modules/Bar/Widgets/Brightness.qml | 2 +- Modules/Bar/Widgets/DarkModeToggle.qml | 2 +- Modules/Bar/Widgets/KeepAwake.qml | 2 +- Modules/Bar/Widgets/KeyboardLayout.qml | 2 +- Modules/Bar/Widgets/MediaMini.qml | 4 +-- Modules/Bar/Widgets/Microphone.qml | 4 +-- Modules/Bar/Widgets/NightLight.qml | 2 +- Modules/Bar/Widgets/NotificationHistory.qml | 2 +- Modules/Bar/Widgets/PowerProfile.qml | 10 +++---- .../Bar/Widgets/ScreenRecorderIndicator.qml | 2 +- Modules/Bar/Widgets/SidePanelToggle.qml | 2 +- Modules/Bar/Widgets/SystemMonitor.qml | 22 +++++++--------- Modules/Bar/Widgets/Volume.qml | 6 ++--- Modules/Bar/Widgets/WiFi.qml | 4 +-- .../BluetoothPanel/BluetoothDevicesList.qml | 3 +-- Modules/BluetoothPanel/BluetoothPanel.qml | 7 +++-- Modules/LockScreen/LockScreen.qml | 2 +- Modules/Notification/Notification.qml | 2 +- .../Notification/NotificationHistoryPanel.qml | 14 +++++----- .../SettingsPanel/Bar/BarSectionEditor.qml | 6 ++--- .../Bar/BarWidgetSettingsDialog.qml | 4 +-- Modules/SettingsPanel/SettingsPanel.qml | 2 +- Modules/SettingsPanel/Tabs/AboutTab.qml | 2 +- Modules/SettingsPanel/Tabs/AudioTab.qml | 4 +-- Modules/SettingsPanel/Tabs/DisplayTab.qml | 2 +- Modules/SettingsPanel/Tabs/GeneralTab.qml | 2 +- .../Tabs/WallpaperSelectorTab.qml | 6 ++--- Modules/SidePanel/Cards/MediaCard.qml | 14 +++++----- Modules/SidePanel/Cards/PowerProfilesCard.qml | 6 ++--- Modules/SidePanel/Cards/ProfileCard.qml | 8 +++--- Modules/SidePanel/Cards/SystemMonitorCard.qml | 8 +++--- Modules/SidePanel/Cards/UtilitiesCard.qml | 6 ++--- Modules/SidePanel/Cards/WeatherCard.qml | 2 +- Modules/WiFiPanel/WiFiPanel.qml | 23 ++++++++-------- Services/BatteryService.qml | 12 ++++----- Services/BluetoothService.qml | 18 ++++++------- Services/LocationService.qml | 20 +++++++------- Services/NetworkService.qml | 12 ++++----- Widgets/NButton.qml | 2 +- Widgets/NCheckbox.qml | 2 +- Widgets/NCircleStat.qml | 2 +- Widgets/NColorPicker.qml | 2 +- Widgets/NColorPickerDialog.qml | 8 +++--- Widgets/NComboBox.qml | 2 +- Widgets/NIcon.qml | 3 +++ Widgets/NIconButton.qml | 2 +- Widgets/NInputAction.qml | 2 +- Widgets/NPill.qml | 2 +- Widgets/NSpinBox.qml | 4 +-- Widgets/NToast.qml | 4 +-- 53 files changed, 155 insertions(+), 174 deletions(-) diff --git a/Commons/Bootstrap.qml b/Commons/Bootstrap.qml index e4ddb04..1cb2ff5 100644 --- a/Commons/Bootstrap.qml +++ b/Commons/Bootstrap.qml @@ -8,8 +8,6 @@ import qs.Commons Singleton { id: root - // "brightness_low": "\uF1D4", - // "brightness_high": "\uF1D2", // "wifi_disable": "\uF61B", // "wifi_low": "\uF619", // "wifi_half": "\uF61A", @@ -31,9 +29,6 @@ Singleton { // "refresh": "\uF130", // "image": "\uF226", // "contrast": "\uF288", - // "thermometer": "\uF5CD", - // "paint_drop": "\uF30C", - // "yin_yang": "\uF8E7", // "record": "\uF518", // "pause": "\uF4C1", // "play": "\uF4F2", @@ -46,10 +41,8 @@ Singleton { // "upload": "\uF296", // "download": "\uF294", // "album": "\uF2FF", - // "minus": "\uF63B", + // "eyedropper": "\uF342", - // "bell": "\uF18A", - // "bell_striked": "\uF631", // "drive": "\uF412", // "person": "\uF4DA", @@ -60,11 +53,7 @@ Singleton { // "moon_stars": "\uF496", // "gauge": "\uF580", // "lightning": "\uF46D", - // "keyboard": "\uF451", - // "link": "\uF470", - // "macaron": "\uF154", - // "box": "\uF1C8", - // "monitor": "\uF302" + // // another contrast \uF8F3 \uF8DA // } property var icons: { diff --git a/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml b/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml index dacaf9a..accde47 100644 --- a/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml +++ b/Modules/ArchUpdaterPanel/ArchUpdaterPanel.qml @@ -27,8 +27,7 @@ NPanel { Layout.fillWidth: true spacing: Style.marginM * scaling - NIcon { - text: "system_update_alt" + NIcon { icon: "system_update_alt" font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } @@ -44,7 +43,7 @@ NPanel { // Reset button (only show if update failed) NIconButton { visible: ArchUpdaterService.updateFailed - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Reset update state" sizeRatio: 0.8 colorBg: Color.mError @@ -55,7 +54,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" sizeRatio: 0.8 onClicked: root.close() @@ -102,8 +101,7 @@ NPanel { Layout.fillHeight: true } // Spacer - NIcon { - text: "hourglass_empty" + NIcon { icon: "hourglass_empty" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mPrimary Layout.alignment: Qt.AlignHCenter @@ -143,7 +141,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "terminal" + icon: "terminal" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mError Layout.alignment: Qt.AlignHCenter @@ -181,7 +179,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "package" + icon: "package" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mError Layout.alignment: Qt.AlignHCenter @@ -219,7 +217,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "error" + icon: "error" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mError Layout.alignment: Qt.AlignHCenter @@ -245,7 +243,7 @@ NPanel { // Prominent refresh button NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Try checking again" sizeRatio: 1.2 colorBg: Color.mPrimary @@ -270,7 +268,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "error_outline" + icon: "error_outline" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mError Layout.alignment: Qt.AlignHCenter @@ -295,7 +293,7 @@ NPanel { // Prominent refresh button NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Refresh and try again" sizeRatio: 1.2 colorBg: Color.mPrimary @@ -323,7 +321,7 @@ NPanel { spacing: Style.marginM * scaling NIcon { - text: "check_circle" + icon: "check_circle" font.pointSize: Style.fontSizeXXXL * scaling color: Color.mPrimary Layout.alignment: Qt.AlignHCenter @@ -483,7 +481,7 @@ NPanel { spacing: Style.marginL * scaling NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: ArchUpdaterService.aurBusy ? "Checking for updates..." : (!ArchUpdaterService.canPoll ? "Refresh available soon" : "Refresh package lists") onClicked: { ArchUpdaterService.forceRefresh() diff --git a/Modules/Bar/Widgets/Bluetooth.qml b/Modules/Bar/Widgets/Bluetooth.qml index 599e40d..760745c 100644 --- a/Modules/Bar/Widgets/Bluetooth.qml +++ b/Modules/Bar/Widgets/Bluetooth.qml @@ -20,7 +20,7 @@ NIconButton { colorBorder: Color.transparent colorBorderHover: Color.transparent - icon: Bootstrap.icons["bluetooth"] + icon: "bluetooth" tooltipText: "Bluetooth" onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(screen, this) } diff --git a/Modules/Bar/Widgets/Brightness.qml b/Modules/Bar/Widgets/Brightness.qml index a1ed557..feafbcc 100644 --- a/Modules/Bar/Widgets/Brightness.qml +++ b/Modules/Bar/Widgets/Brightness.qml @@ -46,7 +46,7 @@ Item { function getIcon() { var monitor = getMonitor() var brightness = monitor ? monitor.brightness : 0 - return brightness <= 0.5 ? Bootstrap.icons["brightness_low"] : Bootstrap.icons["brightness_high"] + return brightness <= 0.5 ? "brightness-low" : "brightness-high" } // Connection used to open the pill when brightness changes diff --git a/Modules/Bar/Widgets/DarkModeToggle.qml b/Modules/Bar/Widgets/DarkModeToggle.qml index 53f60f9..ae7d933 100644 --- a/Modules/Bar/Widgets/DarkModeToggle.qml +++ b/Modules/Bar/Widgets/DarkModeToggle.qml @@ -9,7 +9,7 @@ NIconButton { property ShellScreen screen property real scaling: 1.0 - icon: Bootstrap.icons["contrast"] + icon: "contrast" tooltipText: "Toggle light/dark mode" sizeRatio: 0.8 diff --git a/Modules/Bar/Widgets/KeepAwake.qml b/Modules/Bar/Widgets/KeepAwake.qml index ae588f5..31c6525 100644 --- a/Modules/Bar/Widgets/KeepAwake.qml +++ b/Modules/Bar/Widgets/KeepAwake.qml @@ -13,7 +13,7 @@ NIconButton { sizeRatio: 0.8 - icon: Bootstrap.icons["coffee"] + icon: "coffee" tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake" colorBg: Color.mSurfaceVariant colorFg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mOnSurface diff --git a/Modules/Bar/Widgets/KeyboardLayout.qml b/Modules/Bar/Widgets/KeyboardLayout.qml index 387316e..60ea83e 100644 --- a/Modules/Bar/Widgets/KeyboardLayout.qml +++ b/Modules/Bar/Widgets/KeyboardLayout.qml @@ -24,7 +24,7 @@ Item { anchors.verticalCenter: parent.verticalCenter rightOpen: BarWidgetRegistry.getNPillDirection(root) - icon: Bootstrap.icons["keyboard"] + icon: "keyboard" iconCircleColor: Color.mPrimary collapsedIconColor: Color.mOnSurface autoHide: false // Important to be false so we can hover as long as we want diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index f7a42b5..28badc6 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -134,7 +134,7 @@ RowLayout { NIcon { id: windowIcon - text: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"] + text: MediaService.isPlaying ? "pause" : "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 ? Bootstrap.icons["pause"] : Bootstrap.icons["play"] + fallbackIcon: MediaService.isPlaying ? "pause" : "play" fallbackIconSize: 10 * scaling borderWidth: 0 border.color: Color.transparent diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 15f4437..ed0a54c 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -43,9 +43,9 @@ Item { function getIcon() { if (AudioService.inputMuted) { - return "mic_off" + return "mic-mute" } - return AudioService.inputVolume <= Number.EPSILON ? "mic_off" : (AudioService.inputVolume < 0.33 ? "mic" : "mic") + return AudioService.inputVolume <= Number.EPSILON ? "mic-mute" : (AudioService.inputVolume < 0.33 ? "mic" : "mic") } // Connection used to open the pill when input volume changes diff --git a/Modules/Bar/Widgets/NightLight.qml b/Modules/Bar/Widgets/NightLight.qml index 0de4f72..3712f76 100644 --- a/Modules/Bar/Widgets/NightLight.qml +++ b/Modules/Bar/Widgets/NightLight.qml @@ -20,7 +20,7 @@ NIconButton { colorBorder: Color.transparent colorBorderHover: Color.transparent - icon: Bootstrap.icons["moon-stars"] + icon: "moon-stars" tooltipText: `Night light: ${Settings.data.nightLight.enabled ? "enabled." : "disabled."}\nLeft click to toggle.\nRight click to access settings.` onClicked: Settings.data.nightLight.enabled = !Settings.data.nightLight.enabled diff --git a/Modules/Bar/Widgets/NotificationHistory.qml b/Modules/Bar/Widgets/NotificationHistory.qml index 4a64d36..39b8c8f 100644 --- a/Modules/Bar/Widgets/NotificationHistory.qml +++ b/Modules/Bar/Widgets/NotificationHistory.qml @@ -53,7 +53,7 @@ NIconButton { } sizeRatio: 0.8 - icon: Settings.data.notifications.doNotDisturb ? Bootstrap.icons["bell-slash"] : Bootstrap.icons["bell"] + icon: Settings.data.notifications.doNotDisturb ? "bell-slash" : "bell" tooltipText: Settings.data.notifications.doNotDisturb ? "Notification history.\nRight-click to disable 'Do Not Disturb'." : "Notification history.\nRight-click to enable 'Do Not Disturb'." colorBg: Color.mSurfaceVariant colorFg: Color.mOnSurface diff --git a/Modules/Bar/Widgets/PowerProfile.qml b/Modules/Bar/Widgets/PowerProfile.qml index 43bff33..6968413 100644 --- a/Modules/Bar/Widgets/PowerProfile.qml +++ b/Modules/Bar/Widgets/PowerProfile.qml @@ -19,13 +19,13 @@ NIconButton { function profileIcon() { if (!hasPP) - return Bootstrap.icons["yin-yang"] + return "yin-yang" if (powerProfiles.profile === PowerProfile.Performance) - return Bootstrap.icons["speedometer2"] + return "speedometer2" if (powerProfiles.profile === PowerProfile.Balanced) - return Bootstrap.icons["yin-yang"] + return "yin-yang" if (powerProfiles.profile === PowerProfile.PowerSaver) - return Bootstrap.icons["leaf"] + return "leaf" } function profileName() { @@ -57,4 +57,4 @@ NIconButton { colorBorder: Color.transparent colorBorderHover: Color.transparent onClicked: root.changeProfile() -} \ No newline at end of file +} diff --git a/Modules/Bar/Widgets/ScreenRecorderIndicator.qml b/Modules/Bar/Widgets/ScreenRecorderIndicator.qml index 58c1208..00a785b 100644 --- a/Modules/Bar/Widgets/ScreenRecorderIndicator.qml +++ b/Modules/Bar/Widgets/ScreenRecorderIndicator.qml @@ -11,7 +11,7 @@ NIconButton { property real scaling: 1.0 visible: ScreenRecorderService.isRecording - icon: "videocam" + icon: "camera-video" tooltipText: "Screen recording is active\nClick to stop recording" sizeRatio: 0.8 colorBg: Color.mPrimary diff --git a/Modules/Bar/Widgets/SidePanelToggle.qml b/Modules/Bar/Widgets/SidePanelToggle.qml index 56f3376..3d8b5bc 100644 --- a/Modules/Bar/Widgets/SidePanelToggle.qml +++ b/Modules/Bar/Widgets/SidePanelToggle.qml @@ -33,7 +33,7 @@ NIconButton { readonly property bool useDistroLogo: (widgetSettings.useDistroLogo !== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo - icon: useDistroLogo ? "" : Bootstrap.icons["layout-sidebar-inset-reverse"] + icon: useDistroLogo ? "" :"layout-sidebar-inset-reverse" tooltipText: "Open side panel." sizeRatio: 0.8 diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index e749116..b24edb0 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -64,14 +64,12 @@ RowLayout { Layout.alignment: Qt.AlignVCenter visible: showCpuUsage - NIcon { - id: cpuUsageIcon - text: Bootstrap.icons["speedometer2"] + NIcon { icon: "speedometer2" + font.pointSize: Style.fontSizeM * scaling Layout.alignment: Qt.AlignVCenter } NText { - id: cpuUsageText text: `${SystemStatService.cpuUsage}%` font.family: Settings.data.ui.fontFixed font.pointSize: Style.fontSizeS * scaling @@ -89,8 +87,8 @@ RowLayout { Layout.alignment: Qt.AlignVCenter visible: showCpuTemp - NIcon { - text: Bootstrap.icons["fire"] + NIcon { icon: "fire" + font.pointSize: Style.fontSizeM * scaling Layout.alignment: Qt.AlignVCenter } @@ -112,8 +110,8 @@ RowLayout { Layout.alignment: Qt.AlignVCenter visible: showMemoryUsage - NIcon { - text: Bootstrap.icons["memory"] + NIcon { icon: "memory" + font.pointSize: Style.fontSizeM * scaling Layout.alignment: Qt.AlignVCenter } @@ -135,8 +133,8 @@ RowLayout { Layout.alignment: Qt.AlignVCenter visible: showNetworkStats - NIcon { - text: Bootstrap.icons["download"] + NIcon { icon: "download" + font.pointSize: Style.fontSizeM * scaling Layout.alignment: Qt.AlignVCenter } @@ -158,8 +156,8 @@ RowLayout { Layout.alignment: Qt.AlignVCenter visible: showNetworkStats - NIcon { - text: Bootstrap.icons["upload"] + NIcon { icon: "upload" + font.pointSize: Style.fontSizeM * scaling Layout.alignment: Qt.AlignVCenter } diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index 71fe1f3..677cdba 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -43,11 +43,11 @@ Item { function getIcon() { if (AudioService.muted) { - return Bootstrap.icons["volume-mute"] + return "volume-mute" } return AudioService.volume - <= Number.EPSILON ? Bootstrap.icons["volume-off"] : (AudioService.volume - < 0.5 ? Bootstrap.icons["volume-down"] : Bootstrap.icons["volume-up"]) + <= Number.EPSILON ? "volume-off" : (AudioService.volume + < 0.5 ? "volume-down" : "volume-up") } // Connection used to open the pill when volume changes diff --git a/Modules/Bar/Widgets/WiFi.qml b/Modules/Bar/Widgets/WiFi.qml index bcbde44..4148f0a 100644 --- a/Modules/Bar/Widgets/WiFi.qml +++ b/Modules/Bar/Widgets/WiFi.qml @@ -23,7 +23,7 @@ NIconButton { icon: { try { if (NetworkService.ethernetConnected) { - return Bootstrap.icons["ethernet"] + return "ethernet" } let connected = false let signalStrength = 0 @@ -34,7 +34,7 @@ NIconButton { break } } - return connected ? NetworkService.signalIcon(signalStrength) : "wifi_find" + return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off" } catch (error) { Logger.error("Wi-Fi", "Error getting icon:", error) return "signal_wifi_bad" diff --git a/Modules/BluetoothPanel/BluetoothDevicesList.qml b/Modules/BluetoothPanel/BluetoothDevicesList.qml index 390b709..4b79518 100644 --- a/Modules/BluetoothPanel/BluetoothDevicesList.qml +++ b/Modules/BluetoothPanel/BluetoothDevicesList.qml @@ -65,8 +65,7 @@ ColumnLayout { Layout.alignment: Qt.AlignVCenter // One device BT icon - NIcon { - text: BluetoothService.getDeviceIcon(modelData) + NIcon { icon: BluetoothService.getDeviceIcon(modelData) font.pointSize: Style.fontSizeXXL * scaling color: getContentColor(Color.mOnSurface) Layout.alignment: Qt.AlignVCenter diff --git a/Modules/BluetoothPanel/BluetoothPanel.qml b/Modules/BluetoothPanel/BluetoothPanel.qml index 9c26adc..d9e8ac9 100644 --- a/Modules/BluetoothPanel/BluetoothPanel.qml +++ b/Modules/BluetoothPanel/BluetoothPanel.qml @@ -27,8 +27,7 @@ NPanel { Layout.fillWidth: true spacing: Style.marginM * scaling - NIcon { - text: Bootstrap.icons["bluetooth"] + NIcon { icon: "bluetooth" font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } @@ -43,7 +42,7 @@ NPanel { NIconButton { icon: BluetoothService.adapter - && BluetoothService.adapter.discovering ? Bootstrap.icons["stop"] : Bootstrap.icons["arrow-repeat"] + && BluetoothService.adapter.discovering ? "stop" : "arrow-repeat" tooltipText: "Refresh Devices" sizeRatio: 0.8 onClicked: { @@ -54,7 +53,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" sizeRatio: 0.8 onClicked: { diff --git a/Modules/LockScreen/LockScreen.qml b/Modules/LockScreen/LockScreen.qml index ee048a1..25b69b1 100644 --- a/Modules/LockScreen/LockScreen.qml +++ b/Modules/LockScreen/LockScreen.qml @@ -328,7 +328,7 @@ Loader { width: 100 * scaling height: 100 * scaling imagePath: Settings.data.general.avatarImage - fallbackIcon: Bootstrap.icons["person"] + fallbackIcon: "person" } MouseArea { diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index c78ed0d..96c719a 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -294,7 +294,7 @@ Variants { // Close button positioned absolutely NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" sizeRatio: 0.6 anchors.top: parent.top diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index bf22c19..4b17797 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -30,8 +30,7 @@ NPanel { Layout.fillWidth: true spacing: Style.marginM * scaling - NIcon { - text: Bootstrap.icons["bell"] + NIcon { icon: "bell" font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } @@ -45,21 +44,21 @@ NPanel { } NIconButton { - icon: Settings.data.notifications.doNotDisturb ? Bootstrap.icons["bell-slash"] : Bootstrap.icons["bell"] + icon: Settings.data.notifications.doNotDisturb ? "bell-slash" : "bell" 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: Bootstrap.icons["trash"] + icon: "trash" tooltipText: "Clear history" sizeRatio: 0.8 onClicked: NotificationService.clearHistory() } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" sizeRatio: 0.8 onClicked: { @@ -84,8 +83,7 @@ NPanel { Layout.fillHeight: true } - NIcon { - text: Bootstrap.icons["bell-slash"] + NIcon { icon: "bell-slash" font.pointSize: 64 * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter @@ -175,7 +173,7 @@ NPanel { // Delete button NIconButton { - icon: Bootstrap.icons["trash"] + icon: "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 919deb8..7e27096 100644 --- a/Modules/SettingsPanel/Bar/BarSectionEditor.qml +++ b/Modules/SettingsPanel/Bar/BarSectionEditor.qml @@ -85,7 +85,7 @@ NBox { } NIconButton { - icon: Bootstrap.icons["plus-lg"] + icon: "plus-lg" colorBg: Color.mPrimary colorFg: Color.mOnPrimary @@ -170,7 +170,7 @@ NBox { Loader { active: BarWidgetRegistry.widgetHasUserSettings(modelData.id) sourceComponent: NIconButton { - icon: Bootstrap.icons["gear"] + icon: "gear" sizeRatio: 0.6 colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBg: Color.mOnSurface @@ -210,7 +210,7 @@ NBox { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" sizeRatio: 0.6 colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBg: Color.mOnSurface diff --git a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml index 5cc8e0e..b80c156 100644 --- a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml +++ b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml @@ -84,7 +84,7 @@ Popup { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" onClicked: settingsPopup.close() } } @@ -121,7 +121,7 @@ Popup { NButton { text: "Apply" - icon: Bootstrap.icons["check"] + icon: "check-lg" onClicked: { if (settingsLoader.item && settingsLoader.item.saveSettings) { var newSettings = settingsLoader.item.saveSettings() diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index d07db79..6b5e4bd 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -472,7 +472,7 @@ NPanel { // Close button NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" Layout.alignment: Qt.AlignVCenter onClicked: root.close() diff --git a/Modules/SettingsPanel/Tabs/AboutTab.qml b/Modules/SettingsPanel/Tabs/AboutTab.qml index 7c0b28e..1fffadb 100644 --- a/Modules/SettingsPanel/Tabs/AboutTab.qml +++ b/Modules/SettingsPanel/Tabs/AboutTab.qml @@ -172,7 +172,7 @@ ColumnLayout { imagePath: modelData.avatar_url || "" anchors.fill: parent anchors.margins: Style.marginXS * scaling - fallbackIcon: Bootstrap.icons["person"] + fallbackIcon: "person" borderColor: contributorArea.containsMouse ? Color.mOnTertiary : Color.mPrimary borderWidth: Math.max(1, Style.borderM * scaling) diff --git a/Modules/SettingsPanel/Tabs/AudioTab.qml b/Modules/SettingsPanel/Tabs/AudioTab.qml index dba15ca..16e6781 100644 --- a/Modules/SettingsPanel/Tabs/AudioTab.qml +++ b/Modules/SettingsPanel/Tabs/AudioTab.qml @@ -272,7 +272,7 @@ ColumnLayout { // Button aligned to the center of the actual input field NIconButton { - icon: Bootstrap.icons["plus-lg"] + icon: "plus-lg" Layout.alignment: Qt.AlignBottom Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0 onClicked: { @@ -322,7 +322,7 @@ ColumnLayout { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" sizeRatio: 0.8 Layout.alignment: Qt.AlignVCenter Layout.rightMargin: Style.marginXS * scaling diff --git a/Modules/SettingsPanel/Tabs/DisplayTab.qml b/Modules/SettingsPanel/Tabs/DisplayTab.qml index 03475d0..534b62c 100644 --- a/Modules/SettingsPanel/Tabs/DisplayTab.qml +++ b/Modules/SettingsPanel/Tabs/DisplayTab.qml @@ -181,7 +181,7 @@ ColumnLayout { } NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Reset scaling" onClicked: ScalingService.setScreenScale(modelData, 1.0) } diff --git a/Modules/SettingsPanel/Tabs/GeneralTab.qml b/Modules/SettingsPanel/Tabs/GeneralTab.qml index 6b75b9b..fe4dbcd 100644 --- a/Modules/SettingsPanel/Tabs/GeneralTab.qml +++ b/Modules/SettingsPanel/Tabs/GeneralTab.qml @@ -19,7 +19,7 @@ ColumnLayout { width: 108 * scaling height: 108 * scaling imagePath: Settings.data.general.avatarImage - fallbackIcon: Bootstrap.icons["person"] + fallbackIcon: "person" borderColor: Color.mPrimary borderWidth: Math.max(1, Style.borderM * scaling) Layout.alignment: Qt.AlignTop diff --git a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml index df3556e..8d3e77b 100644 --- a/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml +++ b/Modules/SettingsPanel/Tabs/WallpaperSelectorTab.qml @@ -59,7 +59,7 @@ ColumnLayout { anchors.fill: parent anchors.margins: Style.marginXS * scaling imagePath: currentWallpaper - fallbackIcon: Bootstrap.icons["image"] + fallbackIcon: "image" imageRadius: Style.radiusM * scaling borderColor: Color.mSecondary borderWidth: Style.borderL * 2 * scaling @@ -96,7 +96,7 @@ ColumnLayout { } NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Refresh wallpaper list" onClicked: { WallpaperService.refreshWallpapersList() @@ -181,7 +181,7 @@ ColumnLayout { visible: isSelected NIcon { - text: Bootstrap.icons["check"] + icon: "check-lg" font.pointSize: Style.fontSizeM * scaling font.weight: Style.fontWeightBold color: Color.mOnSecondary diff --git a/Modules/SidePanel/Cards/MediaCard.qml b/Modules/SidePanel/Cards/MediaCard.qml index 17716d7..bc786d5 100644 --- a/Modules/SidePanel/Cards/MediaCard.qml +++ b/Modules/SidePanel/Cards/MediaCard.qml @@ -31,7 +31,7 @@ NBox { } NIcon { - text: Bootstrap.icons["album"] + text: "album" font.pointSize: Style.fontSizeXXXL * 2.5 * scaling color: Color.mPrimary Layout.alignment: Qt.AlignHCenter @@ -89,7 +89,7 @@ NBox { indicator: NIcon { x: playerSelector.width - width y: playerSelector.topPadding + (playerSelector.availableHeight - height) / 2 - text: Bootstrap.icons["arrow_drop_down"] + text: "arrow_drop_down" font.pointSize: Style.fontSizeXXL * scaling color: Color.mOnSurface horizontalAlignment: Text.AlignRight @@ -162,14 +162,14 @@ NBox { anchors.fill: parent anchors.margins: Style.marginXS * scaling imagePath: MediaService.trackArtUrl - fallbackIcon: Bootstrap.icons["album"] + fallbackIcon: "album" borderColor: Color.mOutline borderWidth: Math.max(1, Style.borderS * scaling) } // Fallback icon when no album art available NIcon { - text: Bootstrap.icons["album"] + icon: "album" color: Color.mPrimary font.pointSize: Style.fontSizeL * 12 * scaling visible: !trackArt.visible @@ -307,7 +307,7 @@ NBox { // Previous button NIconButton { - icon: Bootstrap.icons["prev"] + icon: "skip-start" tooltipText: "Previous Media" visible: MediaService.canGoPrevious onClicked: MediaService.canGoPrevious ? MediaService.previous() : {} @@ -315,7 +315,7 @@ NBox { // Play/Pause button NIconButton { - icon: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"] + icon: MediaService.isPlaying ? "pause" : "play" tooltipText: MediaService.isPlaying ? "Pause" : "Play" visible: (MediaService.canPlay || MediaService.canPause) onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {} @@ -323,7 +323,7 @@ NBox { // Next button NIconButton { - icon: Bootstrap.icons["next"] + icon: "skip-end" tooltipText: "Next media" visible: MediaService.canGoNext onClicked: MediaService.canGoNext ? MediaService.next() : {} diff --git a/Modules/SidePanel/Cards/PowerProfilesCard.qml b/Modules/SidePanel/Cards/PowerProfilesCard.qml index 1cc7732..3892c7f 100644 --- a/Modules/SidePanel/Cards/PowerProfilesCard.qml +++ b/Modules/SidePanel/Cards/PowerProfilesCard.qml @@ -28,7 +28,7 @@ NBox { } // Performance NIconButton { - icon: Bootstrap.icons["speedometer2"] + icon: "speedometer2" tooltipText: "Set performance power profile." enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium @@ -42,7 +42,7 @@ NBox { } // Balanced NIconButton { - icon: Bootstrap.icons["yin-yang"] + icon: "yin-yang" tooltipText: "Set balanced power profile." enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium @@ -56,7 +56,7 @@ NBox { } // Eco NIconButton { - icon: Bootstrap.icons["leaf"] + icon: "leaf" tooltipText: "Set eco power profile." enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium diff --git a/Modules/SidePanel/Cards/ProfileCard.qml b/Modules/SidePanel/Cards/ProfileCard.qml index d85a432..a9ef68b 100644 --- a/Modules/SidePanel/Cards/ProfileCard.qml +++ b/Modules/SidePanel/Cards/ProfileCard.qml @@ -32,7 +32,7 @@ NBox { width: Style.baseWidgetSize * 1.25 * scaling height: Style.baseWidgetSize * 1.25 * scaling imagePath: Settings.data.general.avatarImage - fallbackIcon: Bootstrap.icons["person"] + fallbackIcon: "person" borderColor: Color.mPrimary borderWidth: Math.max(1, Style.borderM * scaling) } @@ -58,7 +58,7 @@ NBox { Layout.fillWidth: true } NIconButton { - icon: Bootstrap.icons["gear"] + icon: "gear" tooltipText: "Open settings." onClicked: { settingsPanel.requestedTab = SettingsPanel.Tab.General @@ -68,7 +68,7 @@ NBox { NIconButton { id: powerButton - icon: Bootstrap.icons["power"] + icon: "power" tooltipText: "Power menu." onClicked: { powerPanel.open(screen) @@ -78,7 +78,7 @@ NBox { NIconButton { id: closeButton - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close side panel." onClicked: { sidePanel.close() diff --git a/Modules/SidePanel/Cards/SystemMonitorCard.qml b/Modules/SidePanel/Cards/SystemMonitorCard.qml index c8515fa..f5cda28 100644 --- a/Modules/SidePanel/Cards/SystemMonitorCard.qml +++ b/Modules/SidePanel/Cards/SystemMonitorCard.qml @@ -24,7 +24,7 @@ NBox { NCircleStat { value: SystemStatService.cpuUsage - icon: Bootstrap.icons["speedometer2"] + icon: "speedometer2" flat: true contentScale: 0.8 width: 72 * scaling @@ -33,7 +33,7 @@ NBox { NCircleStat { value: SystemStatService.cpuTemp suffix: "°C" - icon: Bootstrap.icons["fire"] + icon: "fire" flat: true contentScale: 0.8 width: 72 * scaling @@ -41,7 +41,7 @@ NBox { } NCircleStat { value: SystemStatService.memPercent - icon: Bootstrap.icons["memory"] + icon: "memory" flat: true contentScale: 0.8 width: 72 * scaling @@ -49,7 +49,7 @@ NBox { } NCircleStat { value: SystemStatService.diskPercent - icon: Bootstrap.icons["drive"] + icon: "hdd" flat: true contentScale: 0.8 width: 72 * scaling diff --git a/Modules/SidePanel/Cards/UtilitiesCard.qml b/Modules/SidePanel/Cards/UtilitiesCard.qml index c34a7f3..7c00eac 100644 --- a/Modules/SidePanel/Cards/UtilitiesCard.qml +++ b/Modules/SidePanel/Cards/UtilitiesCard.qml @@ -25,7 +25,7 @@ NBox { } // Screen Recorder NIconButton { - icon: Bootstrap.icons["camera-video"] + icon: "camera-video" tooltipText: ScreenRecorderService.isRecording ? "Stop screen recording." : "Start screen recording." colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mPrimary @@ -41,7 +41,7 @@ NBox { // Idle Inhibitor NIconButton { - icon: Bootstrap.icons["cup-hot"] + icon: "cup-hot" tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake." colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary @@ -53,7 +53,7 @@ NBox { // Wallpaper NIconButton { visible: Settings.data.wallpaper.enabled - icon: Bootstrap.icons["image"] + icon: "image" tooltipText: "Left click: Open wallpaper selector.\nRight click: Set random wallpaper." onClicked: { var settingsPanel = PanelService.getPanel("settingsPanel") diff --git a/Modules/SidePanel/Cards/WeatherCard.qml b/Modules/SidePanel/Cards/WeatherCard.qml index 3751478..eab4f16 100644 --- a/Modules/SidePanel/Cards/WeatherCard.qml +++ b/Modules/SidePanel/Cards/WeatherCard.qml @@ -98,7 +98,7 @@ NBox { color: Color.mOnSurface } NIcon { - text: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) + icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } diff --git a/Modules/WiFiPanel/WiFiPanel.qml b/Modules/WiFiPanel/WiFiPanel.qml index 59698ea..bb5ca7c 100644 --- a/Modules/WiFiPanel/WiFiPanel.qml +++ b/Modules/WiFiPanel/WiFiPanel.qml @@ -33,8 +33,7 @@ NPanel { Layout.fillWidth: true spacing: Style.marginM * scaling - NIcon { - text: Settings.data.network.wifiEnabled ? "wifi" : "wifi_off" + NIcon { icon: Settings.data.network.wifiEnabled ? "wifi" : "wifi-off" font.pointSize: Style.fontSizeXXL * scaling color: Settings.data.network.wifiEnabled ? Color.mPrimary : Color.mOnSurfaceVariant } @@ -55,7 +54,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" tooltipText: "Refresh" sizeRatio: 0.8 enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning @@ -63,7 +62,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" tooltipText: "Close" sizeRatio: 0.8 onClicked: root.close() @@ -91,7 +90,7 @@ NPanel { spacing: Style.marginS * scaling NIcon { - text: "error" + icon: "error" font.pointSize: Style.fontSizeL * scaling color: Color.mError } @@ -105,7 +104,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" sizeRatio: 0.6 onClicked: NetworkService.lastError = "" } @@ -129,7 +128,7 @@ NPanel { } NIcon { - text: "wifi_off" + icon: "wifi-off" font.pointSize: 64 * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter @@ -377,7 +376,7 @@ NPanel { && NetworkService.connectingTo !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid - icon: Bootstrap.icons["trash"] + icon: "trash" tooltipText: "Forget network" sizeRatio: 0.7 onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid @@ -492,7 +491,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" sizeRatio: 0.8 onClicked: { passwordSsid = "" @@ -547,7 +546,7 @@ NPanel { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" sizeRatio: 0.8 onClicked: expandedSsid = "" } @@ -571,7 +570,7 @@ NPanel { } NIcon { - text: "wifi_find" + icon: "search" font.pointSize: 64 * scaling color: Color.mOnSurfaceVariant Layout.alignment: Qt.AlignHCenter @@ -586,7 +585,7 @@ NPanel { NButton { text: "Scan again" - icon: Bootstrap.icons["arrow-repeat"] + icon: "arrow-repeat" Layout.alignment: Qt.AlignHCenter onClicked: NetworkService.scan() } diff --git a/Services/BatteryService.qml b/Services/BatteryService.qml index 3bad2cc..e68a239 100644 --- a/Services/BatteryService.qml +++ b/Services/BatteryService.qml @@ -11,20 +11,20 @@ Singleton { // Choose icon based on charge and charging state function getIcon(percent, charging, isReady) { if (!isReady) { - return Bootstrap.icons["exclamation-diamond"] + return "exclamation-diamond" } if (charging) { - return Bootstrap.icons["battery-charging"] + return "battery-charging" } else { if (percent >= 85) - return Bootstrap.icons["battery-full"] + return "battery-full" if (percent >= 45) - return Bootstrap.icons["battery-half"] + return "battery-half" if (percent >= 25) - return Bootstrap.icons["battery-low"] + return "battery-low" if (percent >= 0) - return Bootstrap.icons["battery"] + return "battery" } } } diff --git a/Services/BluetoothService.qml b/Services/BluetoothService.qml index 9b12ebc..b029b70 100644 --- a/Services/BluetoothService.qml +++ b/Services/BluetoothService.qml @@ -51,36 +51,36 @@ Singleton { function getDeviceIcon(device) { if (!device) { - return Bootstrap.icons["bluetooth"] + return "bluetooth" } var name = (device.name || device.deviceName || "").toLowerCase() var icon = (device.icon || "").toLowerCase() if (icon.includes("headset") || icon.includes("audio") || name.includes("headphone") || name.includes("airpod") || name.includes("headset") || name.includes("arctis")) { - return Bootstrap.icons["headset"] + return "headset" } if (icon.includes("mouse") || name.includes("mouse")) { - return Bootstrap.icons["mouse-2"] + return "mouse-2" } if (icon.includes("keyboard") || name.includes("keyboard")) { - return Bootstrap.icons["keyboard"] + return "keyboard" } if (icon.includes("phone") || name.includes("phone") || name.includes("iphone") || name.includes("android") || name.includes("samsung")) { - return Bootstrap.icons["phone"] + return "phone" } if (icon.includes("watch") || name.includes("watch")) { - return Bootstrap.icons["smartwatch"] + return "smartwatch" } if (icon.includes("speaker") || name.includes("speaker")) { - return Bootstrap.icons["speaker"] + return "speaker" } if (icon.includes("display") || name.includes("tv")) { - return Bootstrap.icons["tv"] + return "tv" } - return Bootstrap.icons["bluetooth"] + return "bluetooth" } function canConnect(device) { diff --git a/Services/LocationService.qml b/Services/LocationService.qml index 7575cc5..0cbdbd5 100644 --- a/Services/LocationService.qml +++ b/Services/LocationService.qml @@ -231,24 +231,24 @@ Singleton { // -------------------------------- function weatherSymbolFromCode(code) { if (code === 0) - return Bootstrap.icons["sun"] + return "sun" if (code === 1 || code === 2) - return Bootstrap.icons["cloud-sun"] + return "cloud-sun" if (code === 3) - return Bootstrap.icons["cloud"] + return "cloud" if (code >= 45 && code <= 48) - return Bootstrap.icons["cloud-haze"] + return "cloud-haze" if (code >= 51 && code <= 67) - return Bootstrap.icons["cloud-rain"] + return "cloud-rain" if (code >= 71 && code <= 77) - return Bootstrap.icons["cloud-snow"] + return "cloud-snow" if (code >= 71 && code <= 77) - return Bootstrap.icons["cloud-snow"] + return "cloud-snow" if (code >= 85 && code <= 86) - return Bootstrap.icons["cloud-snow"] + return "cloud-snow" if (code >= 95 && code <= 99) - return Bootstrap.icons["cloud-lightning"] - return Bootstrap.icons["cloud"] + return "cloud-lightning" + return "cloud" } // -------------------------------- diff --git a/Services/NetworkService.qml b/Services/NetworkService.qml index 6bf7ac5..97304c1 100644 --- a/Services/NetworkService.qml +++ b/Services/NetworkService.qml @@ -202,14 +202,12 @@ Singleton { // Helper functions function signalIcon(signal) { if (signal >= 80) - return "network_wifi" - if (signal >= 60) - return "network_wifi_3_bar" - if (signal >= 40) - return "network_wifi_2_bar" + return "wifi" + if (signal >= 50) + return "wifi-2" if (signal >= 20) - return "network_wifi_1_bar" - return "signal_wifi_0_bar" + return "wifi-1" + return "dot" } function isSecured(security) { diff --git a/Widgets/NButton.qml b/Widgets/NButton.qml index 8d8425c..186d474 100644 --- a/Widgets/NButton.qml +++ b/Widgets/NButton.qml @@ -83,7 +83,7 @@ Rectangle { NIcon { Layout.alignment: Qt.AlignVCenter visible: root.icon !== "" - text: root.icon + icon: root.icon font.pointSize: root.iconSize color: { if (!root.enabled) diff --git a/Widgets/NCheckbox.qml b/Widgets/NCheckbox.qml index 4b5962d..3dd9783 100644 --- a/Widgets/NCheckbox.qml +++ b/Widgets/NCheckbox.qml @@ -57,7 +57,7 @@ RowLayout { NIcon { visible: root.checked anchors.centerIn: parent - text: "check" + icon: "check-lg" color: root.activeOnColor font.pointSize: Math.max(Style.fontSizeS, root.baseSize * 0.7) * scaling } diff --git a/Widgets/NCircleStat.qml b/Widgets/NCircleStat.qml index e16cb12..997a99c 100644 --- a/Widgets/NCircleStat.qml +++ b/Widgets/NCircleStat.qml @@ -99,7 +99,7 @@ Rectangle { NIcon { anchors.centerIn: parent - text: root.icon + icon: root.icon font.pointSize: Style.fontSizeLargeXL * scaling * contentScale color: Color.mOnSurface horizontalAlignment: Text.AlignHCenter diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index 7cbeaad..0e80080 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -59,7 +59,7 @@ Rectangle { } NIcon { - text: Bootstrap.icons["eyedropper"] + icon: "paint-bucket" color: Color.mOnSurfaceVariant } } diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 7fe60bc..60f5fd1 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -130,7 +130,7 @@ Popup { spacing: Style.marginS * scaling NIcon { - text: Bootstrap.icons["eyedropper"] + icon: "eyedropper" font.pointSize: Style.fontSizeXXL * scaling color: Color.mPrimary } @@ -148,7 +148,7 @@ Popup { } NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" onClicked: root.close() } } @@ -492,7 +492,7 @@ Popup { NButton { id: cancelButton text: "Cancel" - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" outlined: cancelButton.hovered ? false : true customHeight: 36 * scaling customWidth: 100 * scaling @@ -503,7 +503,7 @@ Popup { NButton { text: "Apply" - icon: Bootstrap.icons["check"] + icon: "check-lg" customHeight: 36 * scaling customWidth: 100 * scaling onClicked: { diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index 538de23..ab3e708 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: Bootstrap.icons["chevron-down"] + icon: "chevron-down" font.pointSize: Style.fontSizeL * scaling } diff --git a/Widgets/NIcon.qml b/Widgets/NIcon.qml index 0dc6f7b..6d70c6f 100644 --- a/Widgets/NIcon.qml +++ b/Widgets/NIcon.qml @@ -4,6 +4,9 @@ import qs.Commons import qs.Widgets Text { + property string icon: "balloon" + + text: Bootstrap.icons[icon] font.family: "bootstrap-icons" font.pointSize: Style.fontSizeL * scaling color: Color.mOnSurface diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index c9755b3..d787880 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -39,7 +39,7 @@ Rectangle { border.width: Math.max(1, Style.borderS * scaling) NIcon { - text: root.icon + icon: root.icon font.pointSize: Style.fontSizeM * scaling color: root.hovering ? colorFgHover : colorFg // Center horizontally diff --git a/Widgets/NInputAction.qml b/Widgets/NInputAction.qml index cc86c03..1ae0629 100644 --- a/Widgets/NInputAction.qml +++ b/Widgets/NInputAction.qml @@ -14,7 +14,7 @@ RowLayout { property string placeholderText: "" property string text: "" property string actionButtonText: "Test" - property string actionButtonIcon: Bootstrap.icons["play"] + property string actionButtonIcon: "play" property bool actionButtonEnabled: text !== "" // Signals diff --git a/Widgets/NPill.qml b/Widgets/NPill.qml index a30e2c7..a64332f 100644 --- a/Widgets/NPill.qml +++ b/Widgets/NPill.qml @@ -117,7 +117,7 @@ Item { } NIcon { - text: root.icon + icon: root.icon font.pointSize: Style.fontSizeM * scaling // When forced shown, use pill text color; otherwise accent color when hovered color: forceOpen ? textColor : (showPill ? iconTextColor : Color.mOnSurface) diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 27d1e0f..a2f2d5c 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -95,7 +95,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: Bootstrap.icons["dash-lg"] + text: "dash-lg" font.pointSize: Style.fontSizeS * scaling color: decreaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary } @@ -130,7 +130,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: Bootstrap.icons["plus-lg"] + text: "plus-lg" font.pointSize: Style.fontSizeS * scaling color: increaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary } diff --git a/Widgets/NToast.qml b/Widgets/NToast.qml index 00cb81b..bd13f38 100644 --- a/Widgets/NToast.qml +++ b/Widgets/NToast.qml @@ -118,7 +118,7 @@ Item { // Icon NIcon { id: icon - text: (root.type == "warning") ? Bootstrap.icons["warning"] : Bootstrap.icons["info"] + text: (root.type == "warning") ? "warning" : "info" color: { switch (root.type) { case "warning": @@ -162,7 +162,7 @@ Item { // Close button (only if persistent or manual dismiss needed) NIconButton { - icon: Bootstrap.icons["x-lg"] + icon: "x-lg" visible: root.persistent || root.duration === 0 colorBg: Color.mSurfaceVariant