New icons: more icons and cleanup
This commit is contained in:
parent
43eec0e387
commit
48f6c0705b
41 changed files with 6201 additions and 5018 deletions
|
|
@ -1,21 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2019-2024 The Bootstrap Authors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
Binary file not shown.
BIN
Assets/Fonts/tabler/tabler-icons.woff2
Normal file
BIN
Assets/Fonts/tabler/tabler-icons.woff2
Normal file
Binary file not shown.
|
|
@ -11,19 +11,28 @@ Singleton {
|
||||||
|
|
||||||
// Expose the font family name for easy access
|
// Expose the font family name for easy access
|
||||||
readonly property string fontFamily: fontLoader.name
|
readonly property string fontFamily: fontLoader.name
|
||||||
readonly property string defaultIcon: Bootstrap.defaultIcon
|
readonly property string defaultIcon: TablerIcons.defaultIcon
|
||||||
|
readonly property var icons: TablerIcons.icons
|
||||||
|
readonly property var aliases: TablerIcons.aliases
|
||||||
|
readonly property string fontPath: "/Assets/Fonts/tabler/tabler-icons.woff2"
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Logger.log("Icons", "Service started")
|
Logger.log("Icons", "Service started")
|
||||||
}
|
}
|
||||||
|
|
||||||
function get(iconName) {
|
function get(iconName) {
|
||||||
return Bootstrap.icons[iconName]
|
// Check in aliases first
|
||||||
|
if (aliases[iconName] !== undefined) {
|
||||||
|
iconName = aliases[iconName]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the appropriate codepoint
|
||||||
|
return icons[iconName]
|
||||||
}
|
}
|
||||||
|
|
||||||
FontLoader {
|
FontLoader {
|
||||||
id: fontLoader
|
id: fontLoader
|
||||||
source: Quickshell.shellDir + "/Assets/Fonts/bootstrap/bootstrap-icons.woff2"
|
source: Quickshell.shellDir + fontPath
|
||||||
}
|
}
|
||||||
|
|
||||||
// Monitor font loading status
|
// Monitor font loading status
|
||||||
|
|
@ -31,9 +40,9 @@ Singleton {
|
||||||
target: fontLoader
|
target: fontLoader
|
||||||
function onStatusChanged() {
|
function onStatusChanged() {
|
||||||
if (fontLoader.status === FontLoader.Ready) {
|
if (fontLoader.status === FontLoader.Ready) {
|
||||||
Logger.log("Bootstrap", "Font loaded successfully:", fontFamily)
|
Logger.log("Icons", "Font loaded successfully:", fontFamily)
|
||||||
} else if (fontLoader.status === FontLoader.Error) {
|
} else if (fontLoader.status === FontLoader.Error) {
|
||||||
Logger.error("Bootstrap", "Font failed to load")
|
Logger.error("Icons", "Font failed to load")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,33 @@ Singleton {
|
||||||
readonly property string defaultIcon: "balloon"
|
readonly property string defaultIcon: "balloon"
|
||||||
|
|
||||||
readonly property var aliases: {
|
readonly property var aliases: {
|
||||||
"close": "x-lg"
|
"close": "x-lg",
|
||||||
|
"settings": "gear",
|
||||||
|
"add": "plus-lg",
|
||||||
|
"media-pause": "pause",
|
||||||
|
"media-play": "play",
|
||||||
|
"media-prev": "skip-start",
|
||||||
|
"media-next": "skip-end",
|
||||||
|
"refresh": "arrow-repeat",
|
||||||
|
"cpu-usage": "speedometer2",
|
||||||
|
"cpu-temperature": "fire",
|
||||||
|
"memory": "cpu",
|
||||||
|
"performance": "speedometer2",
|
||||||
|
"balanced": "yin-yang",
|
||||||
|
"powersaver": "leaf",
|
||||||
|
"download-speed": "cloud-arrow-down",
|
||||||
|
"upload-speed": "cloud-arrow-up",
|
||||||
|
"storage": "hdd",
|
||||||
|
"bluetooth": "bluetooth",
|
||||||
|
"ethernet": "ethernet",
|
||||||
|
"keyboard": "keyboard",
|
||||||
|
"power": "power",
|
||||||
|
"keep-awake": "cup",
|
||||||
|
"nightlight": "moon-stars",
|
||||||
|
"camera-video": "camera-video",
|
||||||
|
"chevron-left": "chevron-left",
|
||||||
|
"chevron-right": "chevron-right",
|
||||||
|
"dark-mode": "transparency"
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property var icons: {
|
readonly property var icons: {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
6072
Commons/IconsSets/TablerIcons.qml
Normal file
6072
Commons/IconsSets/TablerIcons.qml
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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: "arrow-repeat"
|
icon: "refresh"
|
||||||
tooltipText: "Reset update state"
|
tooltipText: "Reset update state"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
colorBg: Color.mError
|
colorBg: Color.mError
|
||||||
|
|
@ -55,7 +55,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: root.close()
|
onClicked: root.close()
|
||||||
|
|
@ -245,7 +245,7 @@ NPanel {
|
||||||
|
|
||||||
// Prominent refresh button
|
// Prominent refresh button
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "arrow-repeat"
|
icon: "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: "arrow-repeat"
|
icon: "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: "arrow-repeat"
|
icon: "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()
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ NIconButton {
|
||||||
return "box"
|
return "box"
|
||||||
}
|
}
|
||||||
if (ArchUpdaterService.aurBusy) {
|
if (ArchUpdaterService.aurBusy) {
|
||||||
return "arrow-repeat"
|
return "refresh"
|
||||||
}
|
}
|
||||||
if (ArchUpdaterService.totalUpdates > 0) {
|
if (ArchUpdaterService.totalUpdates > 0) {
|
||||||
return "box-fill"
|
return "box-fill"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ NIconButton {
|
||||||
property ShellScreen screen
|
property ShellScreen screen
|
||||||
property real scaling: 1.0
|
property real scaling: 1.0
|
||||||
|
|
||||||
icon: "transparency"
|
icon: "dark-mode"
|
||||||
tooltipText: "Toggle light/dark mode"
|
tooltipText: "Toggle light/dark mode"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ NIconButton {
|
||||||
|
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
|
|
||||||
icon: "cup"
|
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
|
||||||
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake"
|
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake"
|
||||||
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
|
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
|
||||||
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mOnSurface
|
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mOnSurface
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ RowLayout {
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
id: windowIcon
|
id: windowIcon
|
||||||
text: MediaService.isPlaying ? "pause" : "play"
|
icon: MediaService.isPlaying ? "media-pause" : "media-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
|
||||||
|
|
@ -155,7 +155,7 @@ RowLayout {
|
||||||
id: trackArt
|
id: trackArt
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
imagePath: MediaService.trackArtUrl
|
imagePath: MediaService.trackArtUrl
|
||||||
fallbackIcon: MediaService.isPlaying ? "pause" : "play"
|
fallbackIcon: MediaService.isPlaying ? "media-pause" : "media-play"
|
||||||
fallbackIconSize: 10 * scaling
|
fallbackIconSize: 10 * scaling
|
||||||
borderWidth: 0
|
borderWidth: 0
|
||||||
border.color: Color.transparent
|
border.color: Color.transparent
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ NIconButton {
|
||||||
colorBorder: Color.transparent
|
colorBorder: Color.transparent
|
||||||
colorBorderHover: Color.transparent
|
colorBorderHover: Color.transparent
|
||||||
|
|
||||||
icon: "moon-stars"
|
icon: Settings.data.nightLight.enabled ? "nightlight-on" : "nightlight-off"
|
||||||
tooltipText: `Night light: ${Settings.data.nightLight.enabled ? "enabled." : "disabled."}\nLeft click to toggle.\nRight click to access settings.`
|
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
|
onClicked: Settings.data.nightLight.enabled = !Settings.data.nightLight.enabled
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ NIconButton {
|
||||||
|
|
||||||
function profileIcon() {
|
function profileIcon() {
|
||||||
if (!hasPP)
|
if (!hasPP)
|
||||||
return "yin-yang"
|
return "balanced"
|
||||||
if (PowerProfileService.profile === PowerProfile.Performance)
|
if (PowerProfileService.profile === PowerProfile.Performance)
|
||||||
return "speedometer2"
|
return "performance"
|
||||||
if (PowerProfileService.profile === PowerProfile.Balanced)
|
if (PowerProfileService.profile === PowerProfile.Balanced)
|
||||||
return "yin-yang"
|
return "balanced"
|
||||||
if (PowerProfileService.profile === PowerProfile.PowerSaver)
|
if (PowerProfileService.profile === PowerProfile.PowerSaver)
|
||||||
return "leaf"
|
return "powersaver"
|
||||||
}
|
}
|
||||||
|
|
||||||
function profileName() {
|
function profileName() {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ NIconButton {
|
||||||
readonly property bool useDistroLogo: (widgetSettings.useDistroLogo
|
readonly property bool useDistroLogo: (widgetSettings.useDistroLogo
|
||||||
!== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo
|
!== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo
|
||||||
|
|
||||||
icon: useDistroLogo ? "" : "layout-sidebar-inset-reverse"
|
icon: useDistroLogo ? "" : "panel"
|
||||||
tooltipText: "Open side panel."
|
tooltipText: "Open side panel."
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "speedometer2"
|
icon: "cpu-usage"
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
@ -101,7 +101,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "fire"
|
icon: "cpu-temperature"
|
||||||
// Fire is so tall, we need to make it smaller
|
// Fire is so tall, we need to make it smaller
|
||||||
font.pointSize: Style.fontSizeS * scaling
|
font.pointSize: Style.fontSizeS * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
@ -132,7 +132,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "cpu"
|
icon: "memory"
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +162,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "cloud-arrow-down"
|
icon: "download-speed"
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
@ -192,7 +192,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "cloud-arrow-up"
|
icon: "upload-speed"
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +222,7 @@ RowLayout {
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "hdd"
|
icon: "storage"
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "arrow-repeat"
|
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "refresh"
|
||||||
tooltipText: "Refresh Devices"
|
tooltipText: "Refresh Devices"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -53,7 +53,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ NPanel {
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "chevron_left"
|
icon: "chevron-left"
|
||||||
tooltipText: "Previous month"
|
tooltipText: "Previous month"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let newDate = new Date(grid.year, grid.month - 1, 1)
|
let newDate = new Date(grid.year, grid.month - 1, 1)
|
||||||
|
|
@ -47,7 +47,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "chevron_right"
|
icon: "chevron-right"
|
||||||
tooltipText: "Next month"
|
tooltipText: "Next month"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let newDate = new Date(grid.year, grid.month + 1, 1)
|
let newDate = new Date(grid.year, grid.month + 1, 1)
|
||||||
|
|
|
||||||
|
|
@ -781,7 +781,7 @@ Loader {
|
||||||
NIcon {
|
NIcon {
|
||||||
id: iconReboot
|
id: iconReboot
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
icon: "arrow-repeat"
|
icon: "refresh"
|
||||||
font.pointSize: Style.fontSizeXXXL * scaling
|
font.pointSize: Style.fontSizeXXXL * scaling
|
||||||
color: restartButtonArea.containsMouse ? Color.mOnPrimary : Color.mPrimary
|
color: restartButtonArea.containsMouse ? Color.mOnPrimary : Color.mPrimary
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ Variants {
|
||||||
|
|
||||||
// Close button positioned absolutely
|
// Close button positioned absolutely
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
sizeRatio: 0.6
|
sizeRatio: 0.6
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ NPanel {
|
||||||
"subtitle": "Put the system to sleep"
|
"subtitle": "Put the system to sleep"
|
||||||
}, {
|
}, {
|
||||||
"action": "reboot",
|
"action": "reboot",
|
||||||
"icon": "arrow-repeat",
|
"icon": "refresh",
|
||||||
"title": "Reboot",
|
"title": "Reboot",
|
||||||
"subtitle": "Restart the system"
|
"subtitle": "Restart the system"
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -276,7 +276,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: timerActive ? "x-square" : "x-lg"
|
icon: timerActive ? "x-square" : "close"
|
||||||
tooltipText: timerActive ? "Cancel Timer" : "Close"
|
tooltipText: timerActive ? "Cancel Timer" : "Close"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
colorBg: timerActive ? Qt.alpha(Color.mError, 0.08) : Color.transparent
|
colorBg: timerActive ? Qt.alpha(Color.mError, 0.08) : Color.transparent
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ NBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "plus-lg"
|
icon: "add"
|
||||||
|
|
||||||
colorBg: Color.mPrimary
|
colorBg: Color.mPrimary
|
||||||
colorFg: Color.mOnPrimary
|
colorFg: Color.mOnPrimary
|
||||||
|
|
@ -170,7 +170,7 @@ NBox {
|
||||||
Loader {
|
Loader {
|
||||||
active: BarWidgetRegistry.widgetHasUserSettings(modelData.id)
|
active: BarWidgetRegistry.widgetHasUserSettings(modelData.id)
|
||||||
sourceComponent: NIconButton {
|
sourceComponent: NIconButton {
|
||||||
icon: "gear"
|
icon: "settings"
|
||||||
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
|
||||||
|
|
@ -210,7 +210,7 @@ NBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
onClicked: settingsPopup.close()
|
onClicked: settingsPopup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ ColumnLayout {
|
||||||
id: iconInput
|
id: iconInput
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
label: "Icon Name"
|
label: "Icon Name"
|
||||||
description: "Pick from Bootstrap Icons or type a name."
|
description: "Select an icon from the library."
|
||||||
placeholderText: "Enter icon name (e.g., speedometer2, gear, house)"
|
placeholderText: "Enter icon name (e.g., cat, gear, house, ...)"
|
||||||
text: widgetData?.icon || widgetMetadata.icon
|
text: widgetData?.icon || widgetMetadata.icon
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,7 +65,7 @@ ColumnLayout {
|
||||||
|
|
||||||
property string query: ""
|
property string query: ""
|
||||||
property string selectedIcon: ""
|
property string selectedIcon: ""
|
||||||
property var allIcons: Object.keys(Bootstrap.icons)
|
property var allIcons: Object.keys(Icons.icons)
|
||||||
property var filteredIcons: allIcons.filter(function (name) {
|
property var filteredIcons: allIcons.filter(function (name) {
|
||||||
return query === "" || name.toLowerCase().indexOf(query.toLowerCase()) !== -1
|
return query === "" || name.toLowerCase().indexOf(query.toLowerCase()) !== -1
|
||||||
})
|
})
|
||||||
|
|
@ -96,7 +96,7 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
onClicked: iconPicker.close()
|
onClicked: iconPicker.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,52 +123,52 @@ NPanel {
|
||||||
let newTabs = [{
|
let newTabs = [{
|
||||||
"id": SettingsPanel.Tab.General,
|
"id": SettingsPanel.Tab.General,
|
||||||
"label": "General",
|
"label": "General",
|
||||||
"icon": "box",
|
"icon": "settings-general",
|
||||||
"source": generalTab
|
"source": generalTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Bar,
|
"id": SettingsPanel.Tab.Bar,
|
||||||
"label": "Bar",
|
"label": "Bar",
|
||||||
"icon": "segmented-nav",
|
"icon": "settings-bar",
|
||||||
"source": barTab
|
"source": barTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Launcher,
|
"id": SettingsPanel.Tab.Launcher,
|
||||||
"label": "Launcher",
|
"label": "Launcher",
|
||||||
"icon": "rocket",
|
"icon": "settings-launcher",
|
||||||
"source": launcherTab
|
"source": launcherTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Audio,
|
"id": SettingsPanel.Tab.Audio,
|
||||||
"label": "Audio",
|
"label": "Audio",
|
||||||
"icon": "speaker",
|
"icon": "settings-audio",
|
||||||
"source": audioTab
|
"source": audioTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Display,
|
"id": SettingsPanel.Tab.Display,
|
||||||
"label": "Display",
|
"label": "Display",
|
||||||
"icon": "display",
|
"icon": "settings-display",
|
||||||
"source": displayTab
|
"source": displayTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Network,
|
"id": SettingsPanel.Tab.Network,
|
||||||
"label": "Network",
|
"label": "Network",
|
||||||
"icon": "ethernet",
|
"icon": "settings-network",
|
||||||
"source": networkTab
|
"source": networkTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Brightness,
|
"id": SettingsPanel.Tab.Brightness,
|
||||||
"label": "Brightness",
|
"label": "Brightness",
|
||||||
"icon": "brightness-high",
|
"icon": "settings-brightness",
|
||||||
"source": brightnessTab
|
"source": brightnessTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Weather,
|
"id": SettingsPanel.Tab.Weather,
|
||||||
"label": "Weather",
|
"label": "Weather",
|
||||||
"icon": "cloud-sun",
|
"icon": "settings-weather",
|
||||||
"source": weatherTab
|
"source": weatherTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.ColorScheme,
|
"id": SettingsPanel.Tab.ColorScheme,
|
||||||
"label": "Color Scheme",
|
"label": "Color Scheme",
|
||||||
"icon": "palette",
|
"icon": "settings-color-scheme",
|
||||||
"source": colorSchemeTab
|
"source": colorSchemeTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Wallpaper,
|
"id": SettingsPanel.Tab.Wallpaper,
|
||||||
"label": "Wallpaper",
|
"label": "Wallpaper",
|
||||||
"icon": "easel",
|
"icon": "settings-wallpaper",
|
||||||
"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": "image",
|
"icon": "settings-wallpaper-selector",
|
||||||
"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": "camera-video",
|
"icon": "settings-screen-recorder",
|
||||||
"source": screenRecorderTab
|
"source": screenRecorderTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.Hooks,
|
"id": SettingsPanel.Tab.Hooks,
|
||||||
"label": "Hooks",
|
"label": "Hooks",
|
||||||
"icon": "link-45deg",
|
"icon": "settings-hooks",
|
||||||
"source": hooksTab
|
"source": hooksTab
|
||||||
}, {
|
}, {
|
||||||
"id": SettingsPanel.Tab.About,
|
"id": SettingsPanel.Tab.About,
|
||||||
"label": "About",
|
"label": "About",
|
||||||
"icon": "info-circle",
|
"icon": "settings-about",
|
||||||
"source": aboutTab
|
"source": aboutTab
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -403,9 +403,9 @@ NPanel {
|
||||||
spacing: Style.marginM * scaling
|
spacing: Style.marginM * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
text: Bootstrap.icons[modelData.icon]
|
icon: modelData.icon
|
||||||
color: tabTextColor
|
color: tabTextColor
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.pointSize: Style.fontSizeXL * scaling
|
||||||
}
|
}
|
||||||
// Tab label
|
// Tab label
|
||||||
NText {
|
NText {
|
||||||
|
|
@ -472,7 +472,7 @@ NPanel {
|
||||||
|
|
||||||
// Close button
|
// Close button
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: root.close()
|
onClicked: root.close()
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ ColumnLayout {
|
||||||
|
|
||||||
// Button aligned to the center of the actual input field
|
// Button aligned to the center of the actual input field
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "plus-lg"
|
icon: "add"
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0
|
Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -322,7 +322,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.rightMargin: Style.marginXS * scaling
|
Layout.rightMargin: Style.marginXS * scaling
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "arrow-repeat"
|
icon: "refresh"
|
||||||
tooltipText: "Reset scaling"
|
tooltipText: "Reset scaling"
|
||||||
onClicked: ScalingService.setScreenScale(modelData, 1.0)
|
onClicked: ScalingService.setScreenScale(modelData, 1.0)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "arrow-repeat"
|
icon: "refresh"
|
||||||
tooltipText: "Refresh wallpaper list"
|
tooltipText: "Refresh wallpaper list"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
WallpaperService.refreshWallpapersList()
|
WallpaperService.refreshWallpapersList()
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ NBox {
|
||||||
|
|
||||||
// Previous button
|
// Previous button
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "skip-start"
|
icon: "media-prev"
|
||||||
tooltipText: "Previous Media"
|
tooltipText: "Previous Media"
|
||||||
visible: MediaService.canGoPrevious
|
visible: MediaService.canGoPrevious
|
||||||
onClicked: MediaService.canGoPrevious ? MediaService.previous() : {}
|
onClicked: MediaService.canGoPrevious ? MediaService.previous() : {}
|
||||||
|
|
@ -315,7 +315,7 @@ NBox {
|
||||||
|
|
||||||
// Play/Pause button
|
// Play/Pause button
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: MediaService.isPlaying ? "pause" : "play"
|
icon: MediaService.isPlaying ? "media-pause" : "media-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() : {}
|
||||||
|
|
@ -323,7 +323,7 @@ NBox {
|
||||||
|
|
||||||
// Next button
|
// Next button
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "skip-end"
|
icon: "media-next"
|
||||||
tooltipText: "Next media"
|
tooltipText: "Next media"
|
||||||
visible: MediaService.canGoNext
|
visible: MediaService.canGoNext
|
||||||
onClicked: MediaService.canGoNext ? MediaService.next() : {}
|
onClicked: MediaService.canGoNext ? MediaService.next() : {}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ NBox {
|
||||||
}
|
}
|
||||||
// Performance
|
// Performance
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "speedometer2"
|
icon: "performance"
|
||||||
tooltipText: "Set performance power profile."
|
tooltipText: "Set performance power profile."
|
||||||
enabled: hasPP
|
enabled: hasPP
|
||||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||||
|
|
@ -42,7 +42,7 @@ NBox {
|
||||||
}
|
}
|
||||||
// Balanced
|
// Balanced
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "yin-yang"
|
icon: "balanced"
|
||||||
tooltipText: "Set balanced power profile."
|
tooltipText: "Set balanced power profile."
|
||||||
enabled: hasPP
|
enabled: hasPP
|
||||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||||
|
|
@ -57,7 +57,7 @@ NBox {
|
||||||
}
|
}
|
||||||
// Eco
|
// Eco
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "leaf"
|
icon: "powersaver"
|
||||||
tooltipText: "Set eco power profile."
|
tooltipText: "Set eco power profile."
|
||||||
enabled: hasPP
|
enabled: hasPP
|
||||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ NBox {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "gear"
|
icon: "settings"
|
||||||
tooltipText: "Open settings."
|
tooltipText: "Open settings."
|
||||||
onClicked: {
|
onClicked: {
|
||||||
settingsPanel.requestedTab = SettingsPanel.Tab.General
|
settingsPanel.requestedTab = SettingsPanel.Tab.General
|
||||||
|
|
@ -79,7 +79,7 @@ NBox {
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close side panel."
|
tooltipText: "Close side panel."
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sidePanel.close()
|
sidePanel.close()
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ NBox {
|
||||||
|
|
||||||
NCircleStat {
|
NCircleStat {
|
||||||
value: SystemStatService.cpuUsage
|
value: SystemStatService.cpuUsage
|
||||||
icon: "speedometer2"
|
icon: "cpu-usage"
|
||||||
flat: true
|
flat: true
|
||||||
contentScale: 0.8
|
contentScale: 0.8
|
||||||
width: 72 * scaling
|
width: 72 * scaling
|
||||||
|
|
@ -33,7 +33,7 @@ NBox {
|
||||||
NCircleStat {
|
NCircleStat {
|
||||||
value: SystemStatService.cpuTemp
|
value: SystemStatService.cpuTemp
|
||||||
suffix: "°C"
|
suffix: "°C"
|
||||||
icon: "fire"
|
icon: "cpu-temperature"
|
||||||
flat: true
|
flat: true
|
||||||
contentScale: 0.8
|
contentScale: 0.8
|
||||||
width: 72 * scaling
|
width: 72 * scaling
|
||||||
|
|
@ -41,7 +41,7 @@ NBox {
|
||||||
}
|
}
|
||||||
NCircleStat {
|
NCircleStat {
|
||||||
value: SystemStatService.memPercent
|
value: SystemStatService.memPercent
|
||||||
icon: "cpu"
|
icon: "memory"
|
||||||
flat: true
|
flat: true
|
||||||
contentScale: 0.8
|
contentScale: 0.8
|
||||||
width: 72 * scaling
|
width: 72 * scaling
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ NBox {
|
||||||
|
|
||||||
// Idle Inhibitor
|
// Idle Inhibitor
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "cup"
|
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
|
||||||
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake."
|
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake."
|
||||||
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
|
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
|
||||||
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary
|
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "arrow-repeat"
|
icon: "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
|
||||||
|
|
@ -63,7 +63,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: root.close()
|
onClicked: root.close()
|
||||||
|
|
@ -105,7 +105,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
sizeRatio: 0.6
|
sizeRatio: 0.6
|
||||||
onClicked: NetworkService.lastError = ""
|
onClicked: NetworkService.lastError = ""
|
||||||
}
|
}
|
||||||
|
|
@ -492,7 +492,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: {
|
onClicked: {
|
||||||
passwordSsid = ""
|
passwordSsid = ""
|
||||||
|
|
@ -547,7 +547,7 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: expandedSsid = ""
|
onClicked: expandedSsid = ""
|
||||||
}
|
}
|
||||||
|
|
@ -586,7 +586,7 @@ NPanel {
|
||||||
|
|
||||||
NButton {
|
NButton {
|
||||||
text: "Scan again"
|
text: "Scan again"
|
||||||
icon: "arrow-repeat"
|
icon: "refresh"
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
onClicked: NetworkService.scan()
|
onClicked: NetworkService.scan()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ Singleton {
|
||||||
return "wifi-2"
|
return "wifi-2"
|
||||||
if (signal >= 20)
|
if (signal >= 20)
|
||||||
return "wifi-1"
|
return "wifi-1"
|
||||||
return "dot"
|
return "wifi-0"
|
||||||
}
|
}
|
||||||
|
|
||||||
function isSecured(security) {
|
function isSecured(security) {
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
onClicked: root.close()
|
onClicked: root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -492,7 +492,7 @@ Popup {
|
||||||
NButton {
|
NButton {
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
outlined: cancelButton.hovered ? false : true
|
outlined: cancelButton.hovered ? false : true
|
||||||
customHeight: 36 * scaling
|
customHeight: 36 * scaling
|
||||||
customWidth: 100 * scaling
|
customWidth: 100 * scaling
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@ import qs.Commons
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: root
|
||||||
|
|
||||||
property string icon: Icons.defaultIcon
|
property string icon: Icons.defaultIcon
|
||||||
property string family: Icons.fontFamily
|
|
||||||
|
|
||||||
visible: (icon !== undefined) && (icon !== "")
|
visible: (icon !== undefined) && (icon !== "")
|
||||||
text: {
|
text: {
|
||||||
|
|
@ -15,11 +16,11 @@ Text {
|
||||||
if (Icons.get(icon) === undefined) {
|
if (Icons.get(icon) === undefined) {
|
||||||
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the icons font")
|
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the icons font")
|
||||||
Logger.callStack()
|
Logger.callStack()
|
||||||
return Icons.get(defaultIcon)
|
return Icons.get(Icons.defaultIcon)
|
||||||
}
|
}
|
||||||
return Icons.get(icon)
|
return Icons.get(icon)
|
||||||
}
|
}
|
||||||
font.family: family
|
font.family: Icons.fontFamily
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ Rectangle {
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: root.icon
|
icon: root.icon
|
||||||
font.pointSize: Math.max(1, root.width * 0.4)
|
font.pointSize: Math.max(1, root.width * 0.5)
|
||||||
color: root.enabled && root.hovering ? colorFgHover : colorFg
|
color: root.enabled && root.hovering ? colorFgHover : colorFg
|
||||||
// Center horizontally
|
// Center horizontally
|
||||||
x: (root.width - width) / 2
|
x: (root.width - width) / 2
|
||||||
|
|
|
||||||
|
|
@ -14,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"
|
property string actionButtonIcon: "media-play"
|
||||||
property bool actionButtonEnabled: text !== ""
|
property bool actionButtonEnabled: text !== ""
|
||||||
|
|
||||||
// Signals
|
// Signals
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ Item {
|
||||||
|
|
||||||
// Close button (only if persistent or manual dismiss needed)
|
// Close button (only if persistent or manual dismiss needed)
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "x-lg"
|
icon: "close"
|
||||||
visible: root.persistent || root.duration === 0
|
visible: root.persistent || root.duration === 0
|
||||||
|
|
||||||
colorBg: Color.mSurfaceVariant
|
colorBg: Color.mSurfaceVariant
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue