1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

feat(bar): enlarge bar icons if widget background is off (#1425)

* use iconSizeLarge if noBackground is on

* widgets: pass noBackground to barIconSize in param
This commit is contained in:
Eggrror404
2026-01-21 23:44:08 +08:00
committed by GitHub
parent fd2c6a0784
commit eebb4827c4
26 changed files with 74 additions and 72 deletions

View File

@@ -752,9 +752,11 @@ Singleton {
return (0.299 * c.r + 0.587 * c.g + 0.114 * c.b) < 0.5; 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; 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) { function barTextSize(barThickness, fontScale) {

View File

@@ -42,7 +42,7 @@ BasePill {
DankIcon { DankIcon {
name: BatteryService.getBatteryIcon() name: BatteryService.getBatteryIcon()
size: Theme.barIconSize(battery.barThickness) size: Theme.barIconSize(battery.barThickness, undefined, battery.barConfig?.noBackground)
color: { color: {
if (!BatteryService.batteryAvailable) { if (!BatteryService.batteryAvailable) {
return Theme.widgetIconColor; return Theme.widgetIconColor;
@@ -78,7 +78,7 @@ BasePill {
DankIcon { DankIcon {
name: BatteryService.getBatteryIcon() name: BatteryService.getBatteryIcon()
size: Theme.barIconSize(battery.barThickness, -4) size: Theme.barIconSize(battery.barThickness, -4, battery.barConfig?.noBackground)
color: { color: {
if (!BatteryService.batteryAvailable) { if (!BatteryService.batteryAvailable) {
return Theme.widgetIconColor; return Theme.widgetIconColor;

View File

@@ -45,7 +45,7 @@ BasePill {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: "shift_lock" name: "shift_lock"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.primary color: Theme.primary
} }
} }

View File

@@ -17,7 +17,7 @@ BasePill {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: "content_paste" name: "content_paste"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
} }
} }

View File

@@ -18,7 +18,7 @@ BasePill {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: "palette" name: "palette"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: root.isActive ? Theme.primary : Theme.surfaceText color: root.isActive ? Theme.primary : Theme.surfaceText
} }
} }

View File

@@ -29,7 +29,7 @@ BasePill {
property real micAccumulator: 0 property real micAccumulator: 0
property real volumeAccumulator: 0 property real volumeAccumulator: 0
property real brightnessAccumulator: 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 { Loader {
active: root.showPrinterIcon active: root.showPrinterIcon
@@ -459,7 +459,7 @@ BasePill {
DankIcon { DankIcon {
name: "screen_record" 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 color: NiriService.hasActiveCast ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showScreenSharingIcon && NiriService.hasCasts visible: root.showScreenSharingIcon && NiriService.hasCasts
@@ -468,7 +468,7 @@ BasePill {
DankIcon { DankIcon {
id: networkIcon id: networkIcon
name: root.getNetworkIconName() name: root.getNetworkIconName()
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: root.getNetworkIconColor() color: root.getNetworkIconColor()
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showNetworkIcon && NetworkService.networkAvailable visible: root.showNetworkIcon && NetworkService.networkAvailable
@@ -477,7 +477,7 @@ BasePill {
DankIcon { DankIcon {
id: vpnIcon id: vpnIcon
name: "vpn_lock" 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 color: NetworkService.vpnConnected ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected
@@ -486,7 +486,7 @@ BasePill {
DankIcon { DankIcon {
id: bluetoothIcon id: bluetoothIcon
name: "bluetooth" name: "bluetooth"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: BluetoothService.connected ? Theme.primary : Theme.surfaceText color: BluetoothService.connected ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
@@ -502,7 +502,7 @@ BasePill {
DankIcon { DankIcon {
id: audioIcon id: audioIcon
name: root.getVolumeIconName() name: root.getVolumeIconName()
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@@ -544,7 +544,7 @@ BasePill {
DankIcon { DankIcon {
id: micIcon id: micIcon
name: root.getMicIconName() name: root.getMicIconName()
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: root.getMicIconColor() color: root.getMicIconColor()
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@@ -586,7 +586,7 @@ BasePill {
DankIcon { DankIcon {
id: brightnessIcon id: brightnessIcon
name: root.getBrightnessIconName() name: root.getBrightnessIconName()
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
@@ -618,7 +618,7 @@ BasePill {
DankIcon { DankIcon {
id: batteryIcon id: batteryIcon
name: Theme.getBatteryIcon(BatteryService.batteryLevel, BatteryService.isCharging, BatteryService.batteryAvailable) 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() color: root.getBatteryIconColor()
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showBatteryIcon && BatteryService.batteryAvailable visible: root.showBatteryIcon && BatteryService.batteryAvailable
@@ -627,7 +627,7 @@ BasePill {
DankIcon { DankIcon {
id: printerIcon id: printerIcon
name: "print" name: "print"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: Theme.primary color: Theme.primary
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs() visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs()
@@ -635,7 +635,7 @@ BasePill {
DankIcon { DankIcon {
name: "settings" name: "settings"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: root.isActive ? Theme.primary : Theme.widgetIconColor color: root.isActive ? Theme.primary : Theme.widgetIconColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.hasNoVisibleIcons() visible: root.hasNoVisibleIcons()

View File

@@ -36,7 +36,7 @@ BasePill {
DankIcon { DankIcon {
name: "memory" name: "memory"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.cpuUsage > 80) { if (DgopService.cpuUsage > 80) {
return Theme.tempDanger; return Theme.tempDanger;
@@ -74,7 +74,7 @@ BasePill {
DankIcon { DankIcon {
id: cpuIcon id: cpuIcon
name: "memory" name: "memory"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.cpuUsage > 80) { if (DgopService.cpuUsage > 80) {
return Theme.tempDanger; return Theme.tempDanger;

View File

@@ -36,7 +36,7 @@ BasePill {
DankIcon { DankIcon {
name: "device_thermostat" name: "device_thermostat"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.cpuTemperature > 85) { if (DgopService.cpuTemperature > 85) {
return Theme.tempDanger; return Theme.tempDanger;
@@ -74,7 +74,7 @@ BasePill {
DankIcon { DankIcon {
id: cpuTempIcon id: cpuTempIcon
name: "device_thermostat" name: "device_thermostat"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.cpuTemperature > 85) { if (DgopService.cpuTemperature > 85) {
return Theme.tempDanger; return Theme.tempDanger;

View File

@@ -57,7 +57,7 @@ BasePill {
DankIcon { DankIcon {
name: layout.getLayoutIcon(layout.currentLayoutSymbol) name: layout.getLayoutIcon(layout.currentLayoutSymbol)
size: Theme.barIconSize(layout.barThickness) size: Theme.barIconSize(layout.barThickness, undefined, layout.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -78,7 +78,7 @@ BasePill {
DankIcon { DankIcon {
name: layout.getLayoutIcon(layout.currentLayoutSymbol) name: layout.getLayoutIcon(layout.currentLayoutSymbol)
size: Theme.barIconSize(layout.barThickness, -4) size: Theme.barIconSize(layout.barThickness, -4, layout.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View File

@@ -112,7 +112,7 @@ BasePill {
DankIcon { DankIcon {
name: "storage" name: "storage"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (root.diskUsagePercent > 90) { if (root.diskUsagePercent > 90) {
return Theme.tempDanger; return Theme.tempDanger;
@@ -146,7 +146,7 @@ BasePill {
DankIcon { DankIcon {
name: "storage" name: "storage"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (root.diskUsagePercent > 90) { if (root.diskUsagePercent > 90) {
return Theme.tempDanger; return Theme.tempDanger;

View File

@@ -104,7 +104,7 @@ BasePill {
DankIcon { DankIcon {
name: "auto_awesome_mosaic" name: "auto_awesome_mosaic"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (root.displayTemp > 80) { if (root.displayTemp > 80) {
return Theme.tempDanger; return Theme.tempDanger;
@@ -142,7 +142,7 @@ BasePill {
DankIcon { DankIcon {
id: gpuTempIcon id: gpuTempIcon
name: "auto_awesome_mosaic" name: "auto_awesome_mosaic"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (root.displayTemp > 80) { if (root.displayTemp > 80) {
return Theme.tempDanger; return Theme.tempDanger;

View File

@@ -17,7 +17,7 @@ BasePill {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: SessionService.idleInhibited ? "motion_sensor_active" : "motion_sensor_idle" 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 color: Theme.widgetTextColor
} }
} }

View File

@@ -61,7 +61,7 @@ BasePill {
DankIcon { DankIcon {
name: "keyboard" name: "keyboard"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }

View File

@@ -21,15 +21,15 @@ BasePill {
visible: SettingsData.launcherLogoMode === "apps" visible: SettingsData.launcherLogoMode === "apps"
anchors.centerIn: parent anchors.centerIn: parent
name: "apps" name: "apps"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
} }
SystemLogo { SystemLogo {
visible: SettingsData.launcherLogoMode === "os" visible: SettingsData.launcherLogoMode === "os"
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
colorOverride: Theme.effectiveLogoColor colorOverride: Theme.effectiveLogoColor
brightnessOverride: SettingsData.launcherLogoBrightness brightnessOverride: SettingsData.launcherLogoBrightness
contrastOverride: SettingsData.launcherLogoContrast contrastOverride: SettingsData.launcherLogoContrast
@@ -38,8 +38,8 @@ BasePill {
IconImage { IconImage {
visible: SettingsData.launcherLogoMode === "dank" visible: SettingsData.launcherLogoMode === "dank"
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
smooth: true smooth: true
mipmap: true mipmap: true
asynchronous: true asynchronous: true
@@ -57,8 +57,8 @@ BasePill {
IconImage { IconImage {
visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway || CompositorService.isScroll || CompositorService.isLabwc) visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway || CompositorService.isScroll || CompositorService.isLabwc)
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
smooth: true smooth: true
asynchronous: true asynchronous: true
source: { source: {
@@ -94,8 +94,8 @@ BasePill {
IconImage { IconImage {
visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== "" visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== ""
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset) height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
smooth: true smooth: true
asynchronous: true asynchronous: true
source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : "" source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : ""

View File

@@ -41,7 +41,7 @@ BasePill {
DankIcon { DankIcon {
name: "network_check" name: "network_check"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -79,7 +79,7 @@ BasePill {
DankIcon { DankIcon {
name: "network_check" name: "network_check"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View File

@@ -44,7 +44,7 @@ BasePill {
anchors.centerIn: parent anchors.centerIn: parent
name: "assignment" name: "assignment"
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: root.isActive ? Theme.primary : Theme.surfaceText color: root.isActive ? Theme.primary : Theme.surfaceText
} }
} }

View File

@@ -18,7 +18,7 @@ BasePill {
id: notifIcon id: notifIcon
anchors.centerIn: parent anchors.centerIn: parent
name: SessionData.doNotDisturb ? "notifications_off" : "notifications" 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) color: SessionData.doNotDisturb ? Theme.primary : (root.isActive ? Theme.primary : Theme.widgetIconColor)
} }

View File

@@ -16,7 +16,7 @@ BasePill {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: "power_settings_new" name: "power_settings_new"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
} }
} }

View File

@@ -38,7 +38,7 @@ BasePill {
DankIcon { DankIcon {
name: "developer_board" name: "developer_board"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.memoryUsage > 90) { if (DgopService.memoryUsage > 90) {
return Theme.tempDanger; return Theme.tempDanger;
@@ -84,7 +84,7 @@ BasePill {
DankIcon { DankIcon {
id: ramIcon id: ramIcon
name: "developer_board" name: "developer_board"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: { color: {
if (DgopService.memoryUsage > 90) { if (DgopService.memoryUsage > 90) {
return Theme.tempDanger; return Theme.tempDanger;

View File

@@ -366,10 +366,10 @@ Item {
IconImage { IconImage {
id: iconImg id: iconImg
anchors.left: parent.left 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 anchors.verticalCenter: parent.verticalCenter
width: Theme.barIconSize(root.barThickness) width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness) height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
source: { source: {
root._desktopEntriesUpdateTrigger; root._desktopEntriesUpdateTrigger;
root._appIdSubstitutionsTrigger; root._appIdSubstitutionsTrigger;
@@ -395,9 +395,9 @@ Item {
DankIcon { DankIcon {
anchors.left: parent.left 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 anchors.verticalCenter: parent.verticalCenter
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
name: "sports_esports" name: "sports_esports"
color: Theme.widgetTextColor color: Theme.widgetTextColor
visible: !iconImg.visible && Paths.isSteamApp(appId) visible: !iconImg.visible && Paths.isSteamApp(appId)
@@ -611,10 +611,10 @@ Item {
IconImage { IconImage {
id: iconImg id: iconImg
anchors.left: parent.left 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 anchors.verticalCenter: parent.verticalCenter
width: Theme.barIconSize(root.barThickness) width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness) height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
source: { source: {
root._desktopEntriesUpdateTrigger; root._desktopEntriesUpdateTrigger;
root._appIdSubstitutionsTrigger; root._appIdSubstitutionsTrigger;
@@ -640,9 +640,9 @@ Item {
DankIcon { DankIcon {
anchors.left: parent.left 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 anchors.verticalCenter: parent.verticalCenter
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
name: "sports_esports" name: "sports_esports"
color: Theme.widgetTextColor color: Theme.widgetTextColor
visible: !iconImg.visible && Paths.isSteamApp(appId) visible: !iconImg.visible && Paths.isSteamApp(appId)

View File

@@ -198,8 +198,8 @@ Item {
IconImage { IconImage {
id: iconImg id: iconImg
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness) width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness) height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
source: delegateRoot.iconSource source: delegateRoot.iconSource
asynchronous: true asynchronous: true
smooth: true smooth: true
@@ -262,7 +262,7 @@ Item {
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
name: root.menuOpen ? "expand_less" : "expand_more" name: root.menuOpen ? "expand_less" : "expand_more"
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
} }
@@ -331,8 +331,8 @@ Item {
IconImage { IconImage {
id: iconImg id: iconImg
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness) width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness) height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
source: delegateRoot.iconSource source: delegateRoot.iconSource
asynchronous: true asynchronous: true
smooth: true smooth: true
@@ -402,7 +402,7 @@ Item {
return root.menuOpen ? "chevron_right" : "chevron_left"; return root.menuOpen ? "chevron_right" : "chevron_left";
} }
} }
size: Theme.barIconSize(root.barThickness) size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
color: Theme.widgetTextColor color: Theme.widgetTextColor
} }
@@ -754,8 +754,8 @@ Item {
IconImage { IconImage {
id: menuIconImg id: menuIconImg
anchors.centerIn: parent anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness) width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
height: Theme.barIconSize(root.barThickness) height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
source: parent.iconSource source: parent.iconSource
asynchronous: true asynchronous: true
smooth: true smooth: true

View File

@@ -33,7 +33,7 @@ BasePill {
return "system_update_alt"; return "system_update_alt";
return "check_circle"; return "check_circle";
} }
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: { color: {
if (SystemUpdateService.hasError) if (SystemUpdateService.hasError)
return Theme.error; return Theme.error;
@@ -90,7 +90,7 @@ BasePill {
return "system_update_alt"; return "system_update_alt";
return "check_circle"; return "check_circle";
} }
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
color: { color: {
if (SystemUpdateService.hasError) if (SystemUpdateService.hasError)
return Theme.error; return Theme.error;

View File

@@ -41,7 +41,7 @@ BasePill {
id: icon id: icon
name: DMSNetworkService.connected ? "vpn_lock" : "vpn_key_off" 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 color: DMSNetworkService.connected ? Theme.primary : Theme.widgetIconColor
opacity: DMSNetworkService.isBusy ? 0.5 : 1.0 opacity: DMSNetworkService.isBusy ? 0.5 : 1.0
anchors.centerIn: parent anchors.centerIn: parent

View File

@@ -30,7 +30,7 @@ BasePill {
DankIcon { DankIcon {
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode) name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
size: Theme.barIconSize(root.barThickness, -6) size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
@@ -57,7 +57,7 @@ BasePill {
DankIcon { DankIcon {
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode) name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
size: Theme.barIconSize(root.barThickness, -6) size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground)
color: Theme.widgetIconColor color: Theme.widgetIconColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View File

@@ -504,7 +504,7 @@ Item {
readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30)) 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 visualWidth: isVertical ? widgetHeight : (workspaceRow.implicitWidth + padding * 2)
readonly property real visualHeight: isVertical ? (workspaceRow.implicitHeight + padding * 2) : widgetHeight 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() { function getRealWorkspaces() {
return root.workspaceList.filter(ws => { return root.workspaceList.filter(ws => {

View File

@@ -59,8 +59,8 @@ Item {
readonly property bool hasVerticalPill: verticalBarPill !== null readonly property bool hasVerticalPill: verticalBarPill !== null
readonly property bool hasPopout: popoutContent !== null readonly property bool hasPopout: popoutContent !== null
readonly property int iconSize: Theme.barIconSize(barThickness, -4) readonly property int iconSize: Theme.barIconSize(barThickness, -4, root.barConfig?.noBackground)
readonly property int iconSizeLarge: Theme.barIconSize(barThickness) readonly property int iconSizeLarge: Theme.barIconSize(barThickness, undefined, root.barConfig?.noBackground)
Component.onCompleted: { Component.onCompleted: {
loadPluginData(); loadPluginData();