From eebb4827c4e638fda08862f4fd07edbb936c9b1e Mon Sep 17 00:00:00 2001 From: Eggrror404 <94736451+Eggrror404@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:44:08 +0800 Subject: [PATCH] feat(bar): enlarge bar icons if widget background is off (#1425) * use iconSizeLarge if noBackground is on * widgets: pass noBackground to barIconSize in param --- quickshell/Common/Theme.qml | 6 +++-- .../Modules/DankBar/Widgets/Battery.qml | 4 ++-- .../DankBar/Widgets/CapsLockIndicator.qml | 2 +- .../DankBar/Widgets/ClipboardButton.qml | 2 +- .../Modules/DankBar/Widgets/ColorPicker.qml | 2 +- .../DankBar/Widgets/ControlCenterButton.qml | 22 +++++++++---------- .../Modules/DankBar/Widgets/CpuMonitor.qml | 4 ++-- .../DankBar/Widgets/CpuTemperature.qml | 4 ++-- .../Modules/DankBar/Widgets/DWLLayout.qml | 4 ++-- .../Modules/DankBar/Widgets/DiskUsage.qml | 4 ++-- .../DankBar/Widgets/GpuTemperature.qml | 4 ++-- .../Modules/DankBar/Widgets/IdleInhibitor.qml | 2 +- .../DankBar/Widgets/KeyboardLayoutName.qml | 2 +- .../DankBar/Widgets/LauncherButton.qml | 18 +++++++-------- .../DankBar/Widgets/NetworkMonitor.qml | 4 ++-- .../Modules/DankBar/Widgets/NotepadButton.qml | 2 +- .../Widgets/NotificationCenterButton.qml | 2 +- .../DankBar/Widgets/PowerMenuButton.qml | 2 +- .../Modules/DankBar/Widgets/RamMonitor.qml | 4 ++-- .../Modules/DankBar/Widgets/RunningApps.qml | 20 ++++++++--------- .../Modules/DankBar/Widgets/SystemTrayBar.qml | 16 +++++++------- .../Modules/DankBar/Widgets/SystemUpdate.qml | 4 ++-- quickshell/Modules/DankBar/Widgets/Vpn.qml | 2 +- .../Modules/DankBar/Widgets/Weather.qml | 4 ++-- .../DankBar/Widgets/WorkspaceSwitcher.qml | 2 +- .../Modules/Plugins/PluginComponent.qml | 4 ++-- 26 files changed, 74 insertions(+), 72 deletions(-) diff --git a/quickshell/Common/Theme.qml b/quickshell/Common/Theme.qml index 75d05469..bce748d1 100644 --- a/quickshell/Common/Theme.qml +++ b/quickshell/Common/Theme.qml @@ -752,9 +752,11 @@ Singleton { return (0.299 * c.r + 0.587 * c.g + 0.114 * c.b) < 0.5; } - function barIconSize(barThickness, offset) { + function barIconSize(barThickness, offset, noBackground) { const defaultOffset = offset !== undefined ? offset : -6; - return Math.round((barThickness / 48) * (iconSize + defaultOffset)); + const size = (noBackground ?? false) ? iconSizeLarge : iconSize; + + return Math.round((barThickness / 48) * (size + defaultOffset)); } function barTextSize(barThickness, fontScale) { diff --git a/quickshell/Modules/DankBar/Widgets/Battery.qml b/quickshell/Modules/DankBar/Widgets/Battery.qml index 1396e6fb..e08a6d27 100644 --- a/quickshell/Modules/DankBar/Widgets/Battery.qml +++ b/quickshell/Modules/DankBar/Widgets/Battery.qml @@ -42,7 +42,7 @@ BasePill { DankIcon { name: BatteryService.getBatteryIcon() - size: Theme.barIconSize(battery.barThickness) + size: Theme.barIconSize(battery.barThickness, undefined, battery.barConfig?.noBackground) color: { if (!BatteryService.batteryAvailable) { return Theme.widgetIconColor; @@ -78,7 +78,7 @@ BasePill { DankIcon { name: BatteryService.getBatteryIcon() - size: Theme.barIconSize(battery.barThickness, -4) + size: Theme.barIconSize(battery.barThickness, -4, battery.barConfig?.noBackground) color: { if (!BatteryService.batteryAvailable) { return Theme.widgetIconColor; diff --git a/quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml b/quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml index e019b550..c67295c4 100644 --- a/quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml +++ b/quickshell/Modules/DankBar/Widgets/CapsLockIndicator.qml @@ -45,7 +45,7 @@ BasePill { DankIcon { anchors.centerIn: parent name: "shift_lock" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.primary } } diff --git a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml index 32d86ace..475dc423 100644 --- a/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml +++ b/quickshell/Modules/DankBar/Widgets/ClipboardButton.qml @@ -17,7 +17,7 @@ BasePill { DankIcon { anchors.centerIn: parent name: "content_paste" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.widgetIconColor } } diff --git a/quickshell/Modules/DankBar/Widgets/ColorPicker.qml b/quickshell/Modules/DankBar/Widgets/ColorPicker.qml index d93695be..b24a1948 100644 --- a/quickshell/Modules/DankBar/Widgets/ColorPicker.qml +++ b/quickshell/Modules/DankBar/Widgets/ColorPicker.qml @@ -18,7 +18,7 @@ BasePill { DankIcon { anchors.centerIn: parent name: "palette" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.isActive ? Theme.primary : Theme.surfaceText } } diff --git a/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml b/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml index 37ccf60d..0741ee98 100644 --- a/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml +++ b/quickshell/Modules/DankBar/Widgets/ControlCenterButton.qml @@ -29,7 +29,7 @@ BasePill { property real micAccumulator: 0 property real volumeAccumulator: 0 property real brightnessAccumulator: 0 - readonly property real vIconSize: Theme.barIconSize(root.barThickness, -4) + readonly property real vIconSize: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) Loader { active: root.showPrinterIcon @@ -459,7 +459,7 @@ BasePill { DankIcon { name: "screen_record" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: NiriService.hasActiveCast ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter visible: root.showScreenSharingIcon && NiriService.hasCasts @@ -468,7 +468,7 @@ BasePill { DankIcon { id: networkIcon name: root.getNetworkIconName() - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.getNetworkIconColor() anchors.verticalCenter: parent.verticalCenter visible: root.showNetworkIcon && NetworkService.networkAvailable @@ -477,7 +477,7 @@ BasePill { DankIcon { id: vpnIcon name: "vpn_lock" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: NetworkService.vpnConnected ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected @@ -486,7 +486,7 @@ BasePill { DankIcon { id: bluetoothIcon name: "bluetooth" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: BluetoothService.connected ? Theme.primary : Theme.surfaceText anchors.verticalCenter: parent.verticalCenter visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled @@ -502,7 +502,7 @@ BasePill { DankIcon { id: audioIcon name: root.getVolumeIconName() - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.widgetIconColor anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -544,7 +544,7 @@ BasePill { DankIcon { id: micIcon name: root.getMicIconName() - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.getMicIconColor() anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -586,7 +586,7 @@ BasePill { DankIcon { id: brightnessIcon name: root.getBrightnessIconName() - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.widgetIconColor anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -618,7 +618,7 @@ BasePill { DankIcon { id: batteryIcon name: Theme.getBatteryIcon(BatteryService.batteryLevel, BatteryService.isCharging, BatteryService.batteryAvailable) - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.getBatteryIconColor() anchors.verticalCenter: parent.verticalCenter visible: root.showBatteryIcon && BatteryService.batteryAvailable @@ -627,7 +627,7 @@ BasePill { DankIcon { id: printerIcon name: "print" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.primary anchors.verticalCenter: parent.verticalCenter visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs() @@ -635,7 +635,7 @@ BasePill { DankIcon { name: "settings" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.isActive ? Theme.primary : Theme.widgetIconColor anchors.verticalCenter: parent.verticalCenter visible: root.hasNoVisibleIcons() diff --git a/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml b/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml index 28a85a13..c0919239 100644 --- a/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml +++ b/quickshell/Modules/DankBar/Widgets/CpuMonitor.qml @@ -36,7 +36,7 @@ BasePill { DankIcon { name: "memory" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.cpuUsage > 80) { return Theme.tempDanger; @@ -74,7 +74,7 @@ BasePill { DankIcon { id: cpuIcon name: "memory" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.cpuUsage > 80) { return Theme.tempDanger; diff --git a/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml b/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml index c59dc6d2..1791fa59 100644 --- a/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml +++ b/quickshell/Modules/DankBar/Widgets/CpuTemperature.qml @@ -36,7 +36,7 @@ BasePill { DankIcon { name: "device_thermostat" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.cpuTemperature > 85) { return Theme.tempDanger; @@ -74,7 +74,7 @@ BasePill { DankIcon { id: cpuTempIcon name: "device_thermostat" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.cpuTemperature > 85) { return Theme.tempDanger; diff --git a/quickshell/Modules/DankBar/Widgets/DWLLayout.qml b/quickshell/Modules/DankBar/Widgets/DWLLayout.qml index b27f4d3b..c8c35cd7 100644 --- a/quickshell/Modules/DankBar/Widgets/DWLLayout.qml +++ b/quickshell/Modules/DankBar/Widgets/DWLLayout.qml @@ -57,7 +57,7 @@ BasePill { DankIcon { name: layout.getLayoutIcon(layout.currentLayoutSymbol) - size: Theme.barIconSize(layout.barThickness) + size: Theme.barIconSize(layout.barThickness, undefined, layout.barConfig?.noBackground) color: Theme.widgetTextColor anchors.horizontalCenter: parent.horizontalCenter } @@ -78,7 +78,7 @@ BasePill { DankIcon { name: layout.getLayoutIcon(layout.currentLayoutSymbol) - size: Theme.barIconSize(layout.barThickness, -4) + size: Theme.barIconSize(layout.barThickness, -4, layout.barConfig?.noBackground) color: Theme.widgetTextColor anchors.verticalCenter: parent.verticalCenter } diff --git a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml b/quickshell/Modules/DankBar/Widgets/DiskUsage.qml index 3346ae69..45bf25ac 100644 --- a/quickshell/Modules/DankBar/Widgets/DiskUsage.qml +++ b/quickshell/Modules/DankBar/Widgets/DiskUsage.qml @@ -112,7 +112,7 @@ BasePill { DankIcon { name: "storage" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (root.diskUsagePercent > 90) { return Theme.tempDanger; @@ -146,7 +146,7 @@ BasePill { DankIcon { name: "storage" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (root.diskUsagePercent > 90) { return Theme.tempDanger; diff --git a/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml b/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml index 38f1968b..a51da700 100644 --- a/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml +++ b/quickshell/Modules/DankBar/Widgets/GpuTemperature.qml @@ -104,7 +104,7 @@ BasePill { DankIcon { name: "auto_awesome_mosaic" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (root.displayTemp > 80) { return Theme.tempDanger; @@ -142,7 +142,7 @@ BasePill { DankIcon { id: gpuTempIcon name: "auto_awesome_mosaic" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (root.displayTemp > 80) { return Theme.tempDanger; diff --git a/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml b/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml index fdae4b1e..2e8ea251 100644 --- a/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml +++ b/quickshell/Modules/DankBar/Widgets/IdleInhibitor.qml @@ -17,7 +17,7 @@ BasePill { DankIcon { anchors.centerIn: parent name: SessionService.idleInhibited ? "motion_sensor_active" : "motion_sensor_idle" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.widgetTextColor } } diff --git a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml index f04af872..a3910cb8 100644 --- a/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml +++ b/quickshell/Modules/DankBar/Widgets/KeyboardLayoutName.qml @@ -61,7 +61,7 @@ BasePill { DankIcon { name: "keyboard" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetTextColor anchors.horizontalCenter: parent.horizontalCenter } diff --git a/quickshell/Modules/DankBar/Widgets/LauncherButton.qml b/quickshell/Modules/DankBar/Widgets/LauncherButton.qml index 15bf3523..7840d1f7 100644 --- a/quickshell/Modules/DankBar/Widgets/LauncherButton.qml +++ b/quickshell/Modules/DankBar/Widgets/LauncherButton.qml @@ -21,15 +21,15 @@ BasePill { visible: SettingsData.launcherLogoMode === "apps" anchors.centerIn: parent name: "apps" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: Theme.widgetIconColor } SystemLogo { visible: SettingsData.launcherLogoMode === "os" anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) - height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) colorOverride: Theme.effectiveLogoColor brightnessOverride: SettingsData.launcherLogoBrightness contrastOverride: SettingsData.launcherLogoContrast @@ -38,8 +38,8 @@ BasePill { IconImage { visible: SettingsData.launcherLogoMode === "dank" anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) - height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) smooth: true mipmap: true asynchronous: true @@ -57,8 +57,8 @@ BasePill { IconImage { visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway || CompositorService.isScroll || CompositorService.isLabwc) anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) - height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) smooth: true asynchronous: true source: { @@ -94,8 +94,8 @@ BasePill { IconImage { visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== "" anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) - height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground) smooth: true asynchronous: true source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : "" diff --git a/quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml b/quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml index a330b0b8..300a9fc4 100644 --- a/quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml +++ b/quickshell/Modules/DankBar/Widgets/NetworkMonitor.qml @@ -41,7 +41,7 @@ BasePill { DankIcon { name: "network_check" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetTextColor anchors.horizontalCenter: parent.horizontalCenter } @@ -79,7 +79,7 @@ BasePill { DankIcon { name: "network_check" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetTextColor anchors.verticalCenter: parent.verticalCenter } diff --git a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml index a61b8776..603be3e4 100644 --- a/quickshell/Modules/DankBar/Widgets/NotepadButton.qml +++ b/quickshell/Modules/DankBar/Widgets/NotepadButton.qml @@ -44,7 +44,7 @@ BasePill { anchors.centerIn: parent name: "assignment" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: root.isActive ? Theme.primary : Theme.surfaceText } } diff --git a/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml b/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml index 1cb1fa0d..14699b4f 100644 --- a/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml +++ b/quickshell/Modules/DankBar/Widgets/NotificationCenterButton.qml @@ -18,7 +18,7 @@ BasePill { id: notifIcon anchors.centerIn: parent name: SessionData.doNotDisturb ? "notifications_off" : "notifications" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: SessionData.doNotDisturb ? Theme.primary : (root.isActive ? Theme.primary : Theme.widgetIconColor) } diff --git a/quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml b/quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml index b02090f9..cf097f72 100644 --- a/quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml +++ b/quickshell/Modules/DankBar/Widgets/PowerMenuButton.qml @@ -16,7 +16,7 @@ BasePill { DankIcon { anchors.centerIn: parent name: "power_settings_new" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetIconColor } } diff --git a/quickshell/Modules/DankBar/Widgets/RamMonitor.qml b/quickshell/Modules/DankBar/Widgets/RamMonitor.qml index 065fad74..bee3af5e 100644 --- a/quickshell/Modules/DankBar/Widgets/RamMonitor.qml +++ b/quickshell/Modules/DankBar/Widgets/RamMonitor.qml @@ -38,7 +38,7 @@ BasePill { DankIcon { name: "developer_board" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.memoryUsage > 90) { return Theme.tempDanger; @@ -84,7 +84,7 @@ BasePill { DankIcon { id: ramIcon name: "developer_board" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: { if (DgopService.memoryUsage > 90) { return Theme.tempDanger; diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index cd204f37..3903f6d5 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -366,10 +366,10 @@ Item { IconImage { id: iconImg anchors.left: parent.left - anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness)) / 2) : Theme.spacingXS + anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)) / 2) : Theme.spacingXS anchors.verticalCenter: parent.verticalCenter - width: Theme.barIconSize(root.barThickness) - height: Theme.barIconSize(root.barThickness) + width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) source: { root._desktopEntriesUpdateTrigger; root._appIdSubstitutionsTrigger; @@ -395,9 +395,9 @@ Item { DankIcon { anchors.left: parent.left - anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness)) / 2) : Theme.spacingXS + anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)) / 2) : Theme.spacingXS anchors.verticalCenter: parent.verticalCenter - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) name: "sports_esports" color: Theme.widgetTextColor visible: !iconImg.visible && Paths.isSteamApp(appId) @@ -611,10 +611,10 @@ Item { IconImage { id: iconImg anchors.left: parent.left - anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness)) / 2) : Theme.spacingXS + anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)) / 2) : Theme.spacingXS anchors.verticalCenter: parent.verticalCenter - width: Theme.barIconSize(root.barThickness) - height: Theme.barIconSize(root.barThickness) + width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) source: { root._desktopEntriesUpdateTrigger; root._appIdSubstitutionsTrigger; @@ -640,9 +640,9 @@ Item { DankIcon { anchors.left: parent.left - anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness)) / 2) : Theme.spacingXS + anchors.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)) / 2) : Theme.spacingXS anchors.verticalCenter: parent.verticalCenter - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) name: "sports_esports" color: Theme.widgetTextColor visible: !iconImg.visible && Paths.isSteamApp(appId) diff --git a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml index b7f89dce..c89114db 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemTrayBar.qml @@ -198,8 +198,8 @@ Item { IconImage { id: iconImg anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness) - height: Theme.barIconSize(root.barThickness) + width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) source: delegateRoot.iconSource asynchronous: true smooth: true @@ -262,7 +262,7 @@ Item { DankIcon { anchors.centerIn: parent name: root.menuOpen ? "expand_less" : "expand_more" - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetTextColor } @@ -331,8 +331,8 @@ Item { IconImage { id: iconImg anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness) - height: Theme.barIconSize(root.barThickness) + width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) source: delegateRoot.iconSource asynchronous: true smooth: true @@ -402,7 +402,7 @@ Item { return root.menuOpen ? "chevron_right" : "chevron_left"; } } - size: Theme.barIconSize(root.barThickness) + size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) color: Theme.widgetTextColor } @@ -754,8 +754,8 @@ Item { IconImage { id: menuIconImg anchors.centerIn: parent - width: Theme.barIconSize(root.barThickness) - height: Theme.barIconSize(root.barThickness) + width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) source: parent.iconSource asynchronous: true smooth: true diff --git a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml index 2d1869e9..196fb090 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml @@ -33,7 +33,7 @@ BasePill { return "system_update_alt"; return "check_circle"; } - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: { if (SystemUpdateService.hasError) return Theme.error; @@ -90,7 +90,7 @@ BasePill { return "system_update_alt"; return "check_circle"; } - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: { if (SystemUpdateService.hasError) return Theme.error; diff --git a/quickshell/Modules/DankBar/Widgets/Vpn.qml b/quickshell/Modules/DankBar/Widgets/Vpn.qml index d0cd5b97..5eea4791 100644 --- a/quickshell/Modules/DankBar/Widgets/Vpn.qml +++ b/quickshell/Modules/DankBar/Widgets/Vpn.qml @@ -41,7 +41,7 @@ BasePill { id: icon name: DMSNetworkService.connected ? "vpn_lock" : "vpn_key_off" - size: Theme.barIconSize(root.barThickness, -4) + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground) color: DMSNetworkService.connected ? Theme.primary : Theme.widgetIconColor opacity: DMSNetworkService.isBusy ? 0.5 : 1.0 anchors.centerIn: parent diff --git a/quickshell/Modules/DankBar/Widgets/Weather.qml b/quickshell/Modules/DankBar/Widgets/Weather.qml index 15a7ce67..e6618918 100644 --- a/quickshell/Modules/DankBar/Widgets/Weather.qml +++ b/quickshell/Modules/DankBar/Widgets/Weather.qml @@ -30,7 +30,7 @@ BasePill { DankIcon { name: WeatherService.getWeatherIcon(WeatherService.weather.wCode) - size: Theme.barIconSize(root.barThickness, -6) + size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground) color: Theme.widgetIconColor anchors.horizontalCenter: parent.horizontalCenter } @@ -57,7 +57,7 @@ BasePill { DankIcon { name: WeatherService.getWeatherIcon(WeatherService.weather.wCode) - size: Theme.barIconSize(root.barThickness, -6) + size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground) color: Theme.widgetIconColor anchors.verticalCenter: parent.verticalCenter } diff --git a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml index a4ccdfdd..2af07dd9 100644 --- a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml @@ -504,7 +504,7 @@ Item { readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30)) readonly property real visualWidth: isVertical ? widgetHeight : (workspaceRow.implicitWidth + padding * 2) readonly property real visualHeight: isVertical ? (workspaceRow.implicitHeight + padding * 2) : widgetHeight - readonly property real appIconSize: Theme.barIconSize(barThickness, -6) + readonly property real appIconSize: Theme.barIconSize(barThickness, -6, root.barConfig?.noBackground) function getRealWorkspaces() { return root.workspaceList.filter(ws => { diff --git a/quickshell/Modules/Plugins/PluginComponent.qml b/quickshell/Modules/Plugins/PluginComponent.qml index dd2e0389..186edca4 100644 --- a/quickshell/Modules/Plugins/PluginComponent.qml +++ b/quickshell/Modules/Plugins/PluginComponent.qml @@ -59,8 +59,8 @@ Item { readonly property bool hasVerticalPill: verticalBarPill !== null readonly property bool hasPopout: popoutContent !== null - readonly property int iconSize: Theme.barIconSize(barThickness, -4) - readonly property int iconSizeLarge: Theme.barIconSize(barThickness) + readonly property int iconSize: Theme.barIconSize(barThickness, -4, root.barConfig?.noBackground) + readonly property int iconSizeLarge: Theme.barIconSize(barThickness, undefined, root.barConfig?.noBackground) Component.onCompleted: { loadPluginData();