mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
feat: Refactor DankBar w/New granular options
- New background toggles - New maxIcon & maxText widget sizes (global) - Dedicated M3 padding slider - New independent icon scale options - Updated logic to improve performance on single & dual bar modes
This commit is contained in:
@@ -572,6 +572,10 @@ Singleton {
|
||||
"widgetTransparency": 1.0,
|
||||
"squareCorners": false,
|
||||
"noBackground": false,
|
||||
"maximizeWidgetIcons": false,
|
||||
"maximizeWidgetText": false,
|
||||
"removeWidgetPadding": false,
|
||||
"widgetPadding": 12,
|
||||
"gothCornersEnabled": false,
|
||||
"gothCornerRadiusOverride": false,
|
||||
"gothCornerRadiusValue": 12,
|
||||
@@ -584,6 +588,7 @@ Singleton {
|
||||
"widgetOutlineOpacity": 1.0,
|
||||
"widgetOutlineThickness": 1,
|
||||
"fontScale": 1.0,
|
||||
"iconScale": 1.0,
|
||||
"autoHide": false,
|
||||
"autoHideDelay": 250,
|
||||
"showOnWindowsOpen": false,
|
||||
|
||||
@@ -1169,21 +1169,23 @@ Singleton {
|
||||
return (0.299 * c.r + 0.587 * c.g + 0.114 * c.b) < 0.5;
|
||||
}
|
||||
|
||||
function barIconSize(barThickness, offset, noBackground) {
|
||||
function barIconSize(barThickness, offset, maximizeIcon, iconScale) {
|
||||
const defaultOffset = offset !== undefined ? offset : -6;
|
||||
const size = (noBackground ?? false) ? iconSizeLarge : iconSize;
|
||||
const size = (maximizeIcon ?? false) ? iconSizeLarge : iconSize;
|
||||
const s = iconScale !== undefined ? iconScale : 1.0;
|
||||
|
||||
return Math.round((barThickness / 48) * (size + defaultOffset));
|
||||
return Math.round((barThickness / 48) * (size + defaultOffset) * s);
|
||||
}
|
||||
|
||||
function barTextSize(barThickness, fontScale) {
|
||||
function barTextSize(barThickness, fontScale, maximizeText) {
|
||||
const scale = barThickness / 48;
|
||||
const dankBarScale = fontScale !== undefined ? fontScale : 1.0;
|
||||
const maxScale = (maximizeText ?? false) ? 1.5 : 1.0;
|
||||
if (scale <= 0.75)
|
||||
return Math.round(fontSizeSmall * 0.9 * dankBarScale);
|
||||
return Math.round(fontSizeSmall * 0.9 * dankBarScale * maxScale);
|
||||
if (scale >= 1.25)
|
||||
return Math.round(fontSizeMedium * dankBarScale);
|
||||
return Math.round(fontSizeSmall * dankBarScale);
|
||||
return Math.round(fontSizeMedium * dankBarScale * maxScale);
|
||||
return Math.round(fontSizeSmall * dankBarScale * maxScale);
|
||||
}
|
||||
|
||||
function getBatteryIcon(level, isCharging, batteryAvailable) {
|
||||
|
||||
@@ -395,6 +395,10 @@ var SPEC = {
|
||||
widgetTransparency: 1.0,
|
||||
squareCorners: false,
|
||||
noBackground: false,
|
||||
maximizeWidgetIcons: false,
|
||||
maximizeWidgetText: false,
|
||||
removeWidgetPadding: false,
|
||||
widgetPadding: 12,
|
||||
gothCornersEnabled: false,
|
||||
gothCornerRadiusOverride: false,
|
||||
gothCornerRadiusValue: 12,
|
||||
@@ -407,6 +411,7 @@ var SPEC = {
|
||||
widgetOutlineOpacity: 1.0,
|
||||
widgetOutlineThickness: 1,
|
||||
fontScale: 1.0,
|
||||
iconScale: 1.0,
|
||||
autoHide: false,
|
||||
autoHideDelay: 250,
|
||||
showOnWindowsOpen: false,
|
||||
|
||||
@@ -400,7 +400,7 @@ BasePill {
|
||||
Component.onCompleted: updateModel()
|
||||
|
||||
visible: dockItems.length > 0
|
||||
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
|
||||
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + 6
|
||||
|
||||
content: Component {
|
||||
Item {
|
||||
@@ -597,7 +597,7 @@ BasePill {
|
||||
readonly property bool enlargeEnabled: (widgetData?.appsDockEnlargeOnHover !== undefined ? widgetData.appsDockEnlargeOnHover : SettingsData.appsDockEnlargeOnHover)
|
||||
readonly property real enlargeScale: enlargeEnabled && mouseArea.containsMouse ? (widgetData?.appsDockEnlargePercentage !== undefined ? widgetData.appsDockEnlargePercentage : SettingsData.appsDockEnlargePercentage) / 100.0 : 1.0
|
||||
readonly property real baseIconSizeMultiplier: (widgetData?.appsDockIconSizePercentage !== undefined ? widgetData.appsDockIconSizePercentage : SettingsData.appsDockIconSizePercentage) / 100.0
|
||||
readonly property real effectiveIconSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) * baseIconSizeMultiplier
|
||||
readonly property real effectiveIconSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) * baseIconSizeMultiplier
|
||||
|
||||
readonly property color activeOverlayColor: {
|
||||
switch (SettingsData.appsDockActiveColorMode) {
|
||||
@@ -795,7 +795,7 @@ BasePill {
|
||||
anchors.rightMargin: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: appItem.windowTitle || appItem.appId
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
|
||||
@@ -42,7 +42,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: BatteryService.getBatteryIcon()
|
||||
size: Theme.barIconSize(battery.barThickness, undefined, battery.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(battery.barThickness, undefined, battery.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (!BatteryService.batteryAvailable) {
|
||||
return Theme.widgetIconColor;
|
||||
@@ -63,7 +63,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: BatteryService.batteryLevel.toString()
|
||||
font.pixelSize: Theme.barTextSize(battery.barThickness, battery.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(battery.barThickness, battery.barConfig?.fontScale, battery.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: BatteryService.batteryAvailable
|
||||
@@ -78,7 +78,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: BatteryService.getBatteryIcon()
|
||||
size: Theme.barIconSize(battery.barThickness, -4, battery.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(battery.barThickness, -4, battery.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (!BatteryService.batteryAvailable) {
|
||||
return Theme.widgetIconColor;
|
||||
@@ -99,7 +99,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: `${BatteryService.batteryLevel}%`
|
||||
font.pixelSize: Theme.barTextSize(battery.barThickness, battery.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(battery.barThickness, battery.barConfig?.fontScale, battery.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: BatteryService.batteryAvailable
|
||||
|
||||
@@ -54,7 +54,7 @@ BasePill {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
name: "shift_lock"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.primary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ BasePill {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
name: "content_paste"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ BasePill {
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
return String(display).padStart(2, '0').charAt(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -53,7 +53,7 @@ BasePill {
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
return String(display).padStart(2, '0').charAt(1);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -67,7 +67,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(0)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -76,7 +76,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(1)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -91,7 +91,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(0)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -100,7 +100,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: String(systemClock?.date?.getSeconds()).padStart(2, '0').charAt(1)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -135,7 +135,7 @@ BasePill {
|
||||
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0');
|
||||
return value.charAt(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.primary
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -150,7 +150,7 @@ BasePill {
|
||||
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0');
|
||||
return value.charAt(1);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.primary
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -171,7 +171,7 @@ BasePill {
|
||||
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0');
|
||||
return value.charAt(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.primary
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -186,7 +186,7 @@ BasePill {
|
||||
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0');
|
||||
return value.charAt(1);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.primary
|
||||
width: Math.round(font.pixelSize * 0.6)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -201,7 +201,7 @@ BasePill {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
property real fontSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
property real fontSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
property real digitWidth: fontSize * 0.6
|
||||
|
||||
property string hoursStr: {
|
||||
|
||||
@@ -19,7 +19,7 @@ BasePill {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
name: "palette"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.isActive ? Theme.primary : Theme.surfaceText
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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, root.barConfig?.noBackground)
|
||||
readonly property real vIconSize: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
property var _hRow: null
|
||||
property var _vCol: null
|
||||
property var _hAudio: null
|
||||
@@ -394,7 +394,7 @@ BasePill {
|
||||
id: audioPercentV
|
||||
visible: root.showAudioPercent
|
||||
text: Math.round((AudioService.sink?.audio?.volume ?? 0) * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: audioIconV.bottom
|
||||
@@ -420,7 +420,7 @@ BasePill {
|
||||
id: micPercentV
|
||||
visible: root.showMicPercent
|
||||
text: Math.round((AudioService.source?.audio?.volume ?? 0) * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: micIconV.bottom
|
||||
@@ -446,7 +446,7 @@ BasePill {
|
||||
id: brightnessPercentV
|
||||
visible: root.showBrightnessPercent
|
||||
text: Math.round(getBrightness() * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: brightnessIconV.bottom
|
||||
@@ -502,7 +502,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "screen_record"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: NiriService.hasActiveCast ? Theme.primary : Theme.surfaceText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showScreenSharingIcon && NiriService.hasCasts
|
||||
@@ -511,7 +511,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: networkIcon
|
||||
name: root.getNetworkIconName()
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.getNetworkIconColor()
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showNetworkIcon && NetworkService.networkAvailable
|
||||
@@ -520,7 +520,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: vpnIcon
|
||||
name: "vpn_lock"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: NetworkService.vpnConnected ? Theme.primary : Theme.surfaceText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected
|
||||
@@ -529,7 +529,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: bluetoothIcon
|
||||
name: "bluetooth"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: BluetoothService.connected ? Theme.primary : Theme.surfaceText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
||||
@@ -545,7 +545,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: audioIcon
|
||||
name: root.getVolumeIconName()
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
@@ -556,7 +556,7 @@ BasePill {
|
||||
id: audioPercent
|
||||
visible: root.showAudioPercent
|
||||
text: Math.round((AudioService.sink?.audio?.volume ?? 0) * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: audioIcon.right
|
||||
@@ -574,7 +574,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: micIcon
|
||||
name: root.getMicIconName()
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.getMicIconColor()
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
@@ -585,7 +585,7 @@ BasePill {
|
||||
id: micPercent
|
||||
visible: root.showMicPercent
|
||||
text: Math.round((AudioService.source?.audio?.volume ?? 0) * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: micIcon.right
|
||||
@@ -603,7 +603,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: brightnessIcon
|
||||
name: root.getBrightnessIconName()
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
@@ -614,7 +614,7 @@ BasePill {
|
||||
id: brightnessPercent
|
||||
visible: root.showBrightnessPercent
|
||||
text: Math.round(getBrightness() * 100) + "%"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: brightnessIcon.right
|
||||
@@ -625,7 +625,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: batteryIcon
|
||||
name: Theme.getBatteryIcon(BatteryService.batteryLevel, BatteryService.isCharging, BatteryService.batteryAvailable)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.getBatteryIconColor()
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showBatteryIcon && BatteryService.batteryAvailable
|
||||
@@ -634,7 +634,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: printerIcon
|
||||
name: "print"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.primary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs()
|
||||
@@ -642,7 +642,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "settings"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.isActive ? Theme.primary : Theme.widgetIconColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.hasNoVisibleIcons()
|
||||
|
||||
@@ -36,7 +36,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "memory"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.cpuUsage > 80) {
|
||||
return Theme.tempDanger;
|
||||
@@ -59,7 +59,7 @@ BasePill {
|
||||
|
||||
return DgopService.cpuUsage.toFixed(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -74,7 +74,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: cpuIcon
|
||||
name: "memory"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.cpuUsage > 80) {
|
||||
return Theme.tempDanger;
|
||||
@@ -101,7 +101,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: cpuBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "88%"
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ BasePill {
|
||||
}
|
||||
return v.toFixed(0) + "%";
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -36,7 +36,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "device_thermostat"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.cpuTemperature > 85) {
|
||||
return Theme.tempDanger;
|
||||
@@ -59,7 +59,7 @@ BasePill {
|
||||
|
||||
return Math.round(DgopService.cpuTemperature).toString();
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -74,7 +74,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: cpuTempIcon
|
||||
name: "device_thermostat"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.cpuTemperature > 85) {
|
||||
return Theme.tempDanger;
|
||||
@@ -101,7 +101,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: tempBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "88°"
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ BasePill {
|
||||
|
||||
return Math.round(DgopService.cpuTemperature) + "°";
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -57,14 +57,14 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: layout.getLayoutIcon(layout.currentLayoutSymbol)
|
||||
size: Theme.barIconSize(layout.barThickness, undefined, layout.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(layout.barThickness, undefined, layout.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: layout.currentLayoutSymbol
|
||||
font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale, layout.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -78,14 +78,14 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: layout.getLayoutIcon(layout.currentLayoutSymbol)
|
||||
size: Theme.barIconSize(layout.barThickness, -4, layout.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(layout.barThickness, -4, layout.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: layout.currentLayoutSymbol
|
||||
font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(layout.barThickness, layout.barConfig?.fontScale, layout.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "storage"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (root.diskUsagePercent > 90) {
|
||||
return Theme.tempDanger;
|
||||
@@ -132,7 +132,7 @@ BasePill {
|
||||
}
|
||||
return root.diskUsagePercent.toFixed(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -146,7 +146,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "storage"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (root.diskUsagePercent > 90) {
|
||||
return Theme.tempDanger;
|
||||
@@ -166,7 +166,7 @@ BasePill {
|
||||
}
|
||||
return root.selectedMount.mount;
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -180,7 +180,7 @@ BasePill {
|
||||
}
|
||||
return root.diskUsagePercent.toFixed(0) + "%";
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -188,7 +188,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: diskBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "100%"
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ BasePill {
|
||||
return "";
|
||||
return Paths.getAppName(activeWindow.appId, activeDesktopEntry);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: Text.ElideRight
|
||||
@@ -200,7 +200,7 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: "•"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.outlineButton
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: !compactMode && appText.text && titleText.text
|
||||
@@ -225,7 +225,7 @@ BasePill {
|
||||
|
||||
return title;
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: Text.ElideRight
|
||||
|
||||
@@ -104,7 +104,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "auto_awesome_mosaic"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (root.displayTemp > 80) {
|
||||
return Theme.tempDanger;
|
||||
@@ -127,7 +127,7 @@ BasePill {
|
||||
|
||||
return Math.round(root.displayTemp).toString();
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -142,7 +142,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: gpuTempIcon
|
||||
name: "auto_awesome_mosaic"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (root.displayTemp > 80) {
|
||||
return Theme.tempDanger;
|
||||
@@ -169,7 +169,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: gpuTempBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "88°"
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ BasePill {
|
||||
|
||||
return Math.round(root.displayTemp) + "°";
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -16,7 +16,7 @@ BasePill {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
name: SessionService.idleInhibited ? "motion_sensor_active" : "motion_sensor_idle"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "keyboard"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -144,7 +144,7 @@ BasePill {
|
||||
const code = root.langCodes[lang] || lang.substring(0, 2);
|
||||
return code.toUpperCase();
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -177,7 +177,7 @@ BasePill {
|
||||
}
|
||||
return root.currentLayout;
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
@@ -21,15 +21,15 @@ BasePill {
|
||||
visible: SettingsData.launcherLogoMode === "apps"
|
||||
anchors.centerIn: parent
|
||||
name: "apps"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
}
|
||||
|
||||
SystemLogo {
|
||||
visible: SettingsData.launcherLogoMode === "os"
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
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, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
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.isMiracle || CompositorService.isLabwc)
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
source: {
|
||||
@@ -96,8 +96,8 @@ BasePill {
|
||||
IconImage {
|
||||
visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== ""
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : ""
|
||||
|
||||
@@ -284,7 +284,7 @@ BasePill {
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: textContainer.displayText
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
wrapMode: Text.NoWrap
|
||||
x: needsScrolling ? -scrollOffset : 0
|
||||
|
||||
@@ -41,7 +41,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "network_check"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -53,7 +53,7 @@ BasePill {
|
||||
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
||||
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.info
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -65,7 +65,7 @@ BasePill {
|
||||
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
||||
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.error
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -79,7 +79,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "network_check"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -90,13 +90,13 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: "↓"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.info
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DgopService.networkRxRate > 0 ? root.formatNetworkSpeed(DgopService.networkRxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -105,7 +105,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: rxBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "88.8 MB/s"
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: "↑"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.error
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: DgopService.networkTxRate > 0 ? root.formatNetworkSpeed(DgopService.networkTxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -134,7 +134,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: txBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: "88.8 MB/s"
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ BasePill {
|
||||
|
||||
anchors.centerIn: parent
|
||||
name: "assignment"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: root.isActive ? Theme.primary : Theme.surfaceText
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ BasePill {
|
||||
id: notifIcon
|
||||
anchors.centerIn: parent
|
||||
name: SessionData.doNotDisturb ? "notifications_off" : "notifications"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: SessionData.doNotDisturb ? Theme.primary : (root.isActive ? Theme.primary : Theme.widgetIconColor)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ BasePill {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
name: "power_settings_new"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ BasePill {
|
||||
id: tooltipText
|
||||
anchors.centerIn: parent
|
||||
text: PrivacyService.getPrivacySummary()
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: "developer_board"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.memoryUsage > 90) {
|
||||
return Theme.tempDanger;
|
||||
@@ -61,7 +61,7 @@ BasePill {
|
||||
|
||||
return DgopService.memoryUsage.toFixed(0);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -69,7 +69,7 @@ BasePill {
|
||||
StyledText {
|
||||
visible: root.showSwap && DgopService.totalSwapKB > 0
|
||||
text: root.swapUsage.toFixed(0)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.surfaceVariantText
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -84,7 +84,7 @@ BasePill {
|
||||
DankIcon {
|
||||
id: ramIcon
|
||||
name: "developer_board"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (DgopService.memoryUsage > 90) {
|
||||
return Theme.tempDanger;
|
||||
@@ -111,7 +111,7 @@ BasePill {
|
||||
|
||||
StyledTextMetrics {
|
||||
id: ramBaseline
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
text: {
|
||||
if (!root.showSwap) {
|
||||
return "88%";
|
||||
@@ -136,7 +136,7 @@ BasePill {
|
||||
}
|
||||
return ramText;
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -135,7 +135,7 @@ BasePill {
|
||||
}
|
||||
}
|
||||
readonly property int windowCount: _groupByApp ? (groupedWindows?.length || 0) : (sortedToplevels?.length || 0)
|
||||
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
|
||||
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + 6
|
||||
|
||||
readonly property string focusedAppId: {
|
||||
if (!sortedToplevels || sortedToplevels.length === 0)
|
||||
@@ -277,10 +277,10 @@ BasePill {
|
||||
IconImage {
|
||||
id: iconImg
|
||||
anchors.left: parent.left
|
||||
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.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)) / 2) : Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
source: {
|
||||
root._desktopEntriesUpdateTrigger;
|
||||
root._appIdSubstitutionsTrigger;
|
||||
@@ -306,9 +306,9 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
anchors.left: parent.left
|
||||
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.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)) / 2) : Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
name: "sports_esports"
|
||||
color: Theme.widgetTextColor
|
||||
visible: !iconImg.visible && Paths.isSteamApp(appId)
|
||||
@@ -359,7 +359,7 @@ BasePill {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: !(widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode)
|
||||
text: windowTitle
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
@@ -531,10 +531,10 @@ BasePill {
|
||||
IconImage {
|
||||
id: iconImg
|
||||
anchors.left: parent.left
|
||||
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.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)) / 2) : Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
source: {
|
||||
root._desktopEntriesUpdateTrigger;
|
||||
root._appIdSubstitutionsTrigger;
|
||||
@@ -560,9 +560,9 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
anchors.left: parent.left
|
||||
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.leftMargin: (widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode) ? Math.round((parent.width - Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)) / 2) : Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
name: "sports_esports"
|
||||
color: Theme.widgetTextColor
|
||||
visible: !iconImg.visible && Paths.isSteamApp(appId)
|
||||
@@ -613,7 +613,7 @@ BasePill {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: !(widgetData?.runningAppsCompactMode !== undefined ? widgetData.runningAppsCompactMode : SettingsData.runningAppsCompactMode)
|
||||
text: windowTitle
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
|
||||
@@ -137,7 +137,7 @@ BasePill {
|
||||
}
|
||||
}
|
||||
|
||||
readonly property real trayItemSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
|
||||
readonly property real trayItemSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + 6
|
||||
|
||||
readonly property real minTooltipY: {
|
||||
if (!parentScreen || !isVerticalOrientation) {
|
||||
@@ -277,8 +277,8 @@ BasePill {
|
||||
IconImage {
|
||||
id: iconImg
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
source: delegateRoot.iconSource
|
||||
asynchronous: true
|
||||
smooth: true
|
||||
@@ -405,7 +405,7 @@ BasePill {
|
||||
DankIcon {
|
||||
anchors.centerIn: parent
|
||||
name: root.menuOpen ? "expand_less" : "expand_more"
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
}
|
||||
|
||||
@@ -534,8 +534,8 @@ BasePill {
|
||||
IconImage {
|
||||
id: iconImg
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
source: delegateRoot.iconSource
|
||||
asynchronous: true
|
||||
smooth: true
|
||||
@@ -669,7 +669,7 @@ BasePill {
|
||||
return root.menuOpen ? "chevron_right" : "chevron_left";
|
||||
}
|
||||
}
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetTextColor
|
||||
}
|
||||
|
||||
@@ -1029,8 +1029,8 @@ BasePill {
|
||||
IconImage {
|
||||
id: menuIconImg
|
||||
anchors.centerIn: parent
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground)
|
||||
width: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
height: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
source: parent.iconSource
|
||||
asynchronous: true
|
||||
smooth: true
|
||||
|
||||
@@ -72,7 +72,7 @@ BasePill {
|
||||
return "system_update_alt";
|
||||
return "check_circle";
|
||||
}
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (SystemUpdateService.hasError)
|
||||
return Theme.error;
|
||||
@@ -106,8 +106,8 @@ BasePill {
|
||||
color: Theme.error
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.rightMargin: (barConfig?.noBackground ?? false) ? 0 : 6
|
||||
anchors.topMargin: (barConfig?.noBackground ?? false) ? 0 : 6
|
||||
anchors.rightMargin: (barConfig?.removeWidgetPadding ?? false) ? 0 : 6
|
||||
anchors.topMargin: (barConfig?.removeWidgetPadding ?? false) ? 0 : 6
|
||||
visible: root.isVerticalOrientation && root.hasUpdates && !root.isChecking
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ BasePill {
|
||||
return "system_update_alt";
|
||||
return "check_circle";
|
||||
}
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: {
|
||||
if (SystemUpdateService.hasError)
|
||||
return Theme.error;
|
||||
@@ -160,7 +160,7 @@ BasePill {
|
||||
id: countText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: SystemUpdateService.updateCount.toString()
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
visible: root.hasUpdates && !root.isChecking
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ BasePill {
|
||||
id: icon
|
||||
|
||||
name: DMSNetworkService.connected ? "vpn_lock" : "vpn_key_off"
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: DMSNetworkService.connected ? Theme.primary : Theme.widgetIconColor
|
||||
opacity: DMSNetworkService.isBusy ? 0.5 : 1.0
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -30,7 +30,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
||||
size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -43,7 +43,7 @@ BasePill {
|
||||
const temp = SettingsData.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp;
|
||||
return temp;
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
@@ -57,7 +57,7 @@ BasePill {
|
||||
|
||||
DankIcon {
|
||||
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
||||
size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.noBackground)
|
||||
size: Theme.barIconSize(root.barThickness, -6, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
color: Theme.widgetIconColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -70,7 +70,7 @@ BasePill {
|
||||
const temp = SettingsData.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp;
|
||||
return temp + "°" + (SettingsData.useFahrenheit ? "F" : "C");
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText)
|
||||
color: Theme.widgetTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
@@ -515,10 +515,11 @@ Item {
|
||||
return activeWs ? (activeWs.id || activeWs.name || "1") : "1";
|
||||
}
|
||||
|
||||
readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30))
|
||||
readonly property real dpr: parentScreen ? CompositorService.getScreenScale(parentScreen) : 1
|
||||
readonly property real padding: (root.barConfig?.removeWidgetPadding ?? false) ? 0 : Theme.snap((root.barConfig?.widgetPadding ?? 12) * (widgetHeight / 30), dpr)
|
||||
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 + SettingsData.workspaceAppIconSizeOffset, root.barConfig?.noBackground)
|
||||
readonly property real appIconSize: Theme.barIconSize(barThickness, -6 + SettingsData.workspaceAppIconSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
|
||||
function getRealWorkspaces() {
|
||||
return root.workspaceList.filter(ws => {
|
||||
@@ -925,9 +926,11 @@ Item {
|
||||
return false;
|
||||
}
|
||||
readonly property var loadedIconData: {
|
||||
if (isPlaceholder) return null;
|
||||
if (isPlaceholder)
|
||||
return null;
|
||||
const name = modelData?.name;
|
||||
if (!name) return null;
|
||||
if (!name)
|
||||
return null;
|
||||
return SettingsData.getWorkspaceNameIcon(name);
|
||||
}
|
||||
readonly property bool loadedHasIcon: loadedIconData !== null
|
||||
@@ -987,12 +990,12 @@ Item {
|
||||
return (SettingsData.groupWorkspaceApps && !isActive) ? groupedCount : totalCount;
|
||||
}
|
||||
|
||||
readonly property real baseWidth: root.isVertical ? (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5) : (isActive ? root.widgetHeight * 1.05 : root.widgetHeight * 0.7)
|
||||
readonly property real baseHeight: root.isVertical ? (isActive ? root.widgetHeight * 1.05 : root.widgetHeight * 0.7) : (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5)
|
||||
readonly property real baseWidth: root.isVertical ? (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5) : (isActive ? Math.max(root.widgetHeight * 1.05, root.appIconSize * 1.6) : Math.max(root.widgetHeight * 0.7, root.appIconSize * 1.2))
|
||||
readonly property real baseHeight: root.isVertical ? (isActive ? Math.max(root.widgetHeight * 1.05, root.appIconSize * 1.6) : Math.max(root.widgetHeight * 0.7, root.appIconSize * 1.2)) : (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5)
|
||||
readonly property bool hasWorkspaceName: SettingsData.showWorkspaceName && modelData?.name && modelData.name !== ""
|
||||
readonly property bool workspaceNamesEnabled: SettingsData.showWorkspaceName && (CompositorService.isNiri || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
readonly property real contentImplicitWidth: hasWorkspaceName ? (appIconsLoader.item?.contentWidth ?? 0) : 0
|
||||
readonly property real contentImplicitHeight: workspaceNamesEnabled ? (appIconsLoader.item?.contentHeight ?? 0) : 0
|
||||
readonly property real contentImplicitWidth: appIconsLoader.item?.contentWidth ?? 0
|
||||
readonly property real contentImplicitHeight: appIconsLoader.item?.contentHeight ?? 0
|
||||
|
||||
readonly property real iconsExtraWidth: {
|
||||
if (!root.isVertical && SettingsData.showWorkspaceApps && stableIconCount > 0) {
|
||||
@@ -1423,7 +1426,7 @@ Item {
|
||||
id: wsIcon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
name: loadedIconData?.value ?? ""
|
||||
size: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
size: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
weight: (isActive && !isPlaceholder) ? 500 : 400
|
||||
}
|
||||
@@ -1439,7 +1442,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: loadedIconData?.value ?? ""
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
}
|
||||
@@ -1454,7 +1457,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: loadedHasIcon ? (modelData?.name ?? "") : root.getWorkspaceIndex(modelData, index)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
}
|
||||
@@ -1555,7 +1558,7 @@ Item {
|
||||
visible: loadedHasIcon && loadedIconData?.type === "icon"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
name: loadedIconData?.value ?? ""
|
||||
size: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
size: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
weight: (isActive && !isPlaceholder) ? 500 : 400
|
||||
}
|
||||
@@ -1565,7 +1568,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: loadedIconData?.value ?? ""
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
|
||||
@@ -1574,7 +1577,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: loadedHasIcon ? (root.isVertical ? (modelData?.name ?? "").charAt(0) : (modelData?.name ?? "")) : root.getWorkspaceIndex(modelData, index)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale, barConfig?.maximizeWidgetText)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
|
||||
@@ -1665,7 +1668,6 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: updateAllData()
|
||||
|
||||
@@ -27,7 +27,7 @@ Item {
|
||||
property bool isTopBarEdge: false
|
||||
property bool isBottomBarEdge: false
|
||||
readonly property real dpr: parentScreen ? CompositorService.getScreenScale(parentScreen) : 1
|
||||
readonly property real horizontalPadding: (barConfig?.noBackground ?? false) ? 0 : Theme.snap(Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30)), dpr)
|
||||
readonly property real horizontalPadding: (barConfig?.removeWidgetPadding ?? false) ? 0 : Theme.snap((barConfig?.widgetPadding ?? 12) * (widgetThickness / 30), dpr)
|
||||
readonly property real visualWidth: Theme.snap(isVerticalOrientation ? widgetThickness : (contentLoader.item ? (contentLoader.item.implicitWidth + horizontalPadding * 2) : 0), dpr)
|
||||
readonly property real visualHeight: Theme.snap(isVerticalOrientation ? (contentLoader.item ? (contentLoader.item.implicitHeight + horizontalPadding * 2) : 0) : widgetThickness, dpr)
|
||||
readonly property alias visualContent: visualContent
|
||||
|
||||
@@ -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, root.barConfig?.noBackground)
|
||||
readonly property int iconSizeLarge: Theme.barIconSize(barThickness, undefined, root.barConfig?.noBackground)
|
||||
readonly property int iconSize: Theme.barIconSize(barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
readonly property int iconSizeLarge: Theme.barIconSize(barThickness, undefined, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale)
|
||||
|
||||
Component.onCompleted: {
|
||||
loadPluginData();
|
||||
|
||||
@@ -28,174 +28,7 @@ Item {
|
||||
return pos === SettingsData.Position.Left || pos === SettingsData.Position.Right;
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: horizontalBarChangeDebounce
|
||||
interval: 500
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
const verticalBars = SettingsData.barConfigs.filter(cfg => {
|
||||
const pos = cfg.position ?? SettingsData.Position.Top;
|
||||
return pos === SettingsData.Position.Left || pos === SettingsData.Position.Right;
|
||||
});
|
||||
|
||||
verticalBars.forEach(bar => {
|
||||
if (!bar.enabled)
|
||||
return;
|
||||
SettingsData.updateBarConfig(bar.id, {
|
||||
enabled: false
|
||||
});
|
||||
Qt.callLater(() => SettingsData.updateBarConfig(bar.id, {
|
||||
enabled: true
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: edgeSpacingDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 4
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
spacing: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: exclusiveZoneDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 0
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
bottomGap: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: sizeDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 4
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
innerPadding: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: popupGapsManualDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 4
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
popupGapsManual: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: gothCornerRadiusDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 12
|
||||
onTriggered: SettingsData.updateBarConfig(selectedBarId, {
|
||||
gothCornerRadiusValue: pendingValue
|
||||
})
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: borderOpacityDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1.0
|
||||
onTriggered: SettingsData.updateBarConfig(selectedBarId, {
|
||||
borderOpacity: pendingValue
|
||||
})
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: borderThicknessDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1
|
||||
onTriggered: SettingsData.updateBarConfig(selectedBarId, {
|
||||
borderThickness: pendingValue
|
||||
})
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: widgetOutlineOpacityDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1.0
|
||||
onTriggered: SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetOutlineOpacity: pendingValue
|
||||
})
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: widgetOutlineThicknessDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1
|
||||
onTriggered: SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetOutlineThickness: pendingValue
|
||||
})
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: barTransparencyDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1.0
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
transparency: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: widgetTransparencyDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1.0
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetTransparency: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: fontScaleDebounce
|
||||
interval: 100
|
||||
repeat: false
|
||||
property real pendingValue: 1.0
|
||||
onTriggered: {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
fontScale: pendingValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
}
|
||||
|
||||
function notifyHorizontalBarChange() {
|
||||
if (selectedBarIsVertical)
|
||||
return;
|
||||
horizontalBarChangeDebounce.restart();
|
||||
}
|
||||
|
||||
function createNewBar() {
|
||||
@@ -917,9 +750,11 @@ Item {
|
||||
minimum: 0
|
||||
maximum: 32
|
||||
defaultValue: 4
|
||||
onSliderValueChanged: newValue => {
|
||||
edgeSpacingDebounce.pendingValue = newValue;
|
||||
edgeSpacingDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
spacing: finalValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -937,9 +772,11 @@ Item {
|
||||
minimum: -50
|
||||
maximum: 50
|
||||
defaultValue: 0
|
||||
onSliderValueChanged: newValue => {
|
||||
exclusiveZoneDebounce.pendingValue = newValue;
|
||||
exclusiveZoneDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
bottomGap: finalValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -957,9 +794,11 @@ Item {
|
||||
minimum: -8
|
||||
maximum: 24
|
||||
defaultValue: 4
|
||||
onSliderValueChanged: newValue => {
|
||||
sizeDebounce.pendingValue = newValue;
|
||||
sizeDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
innerPadding: finalValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -970,6 +809,31 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
id: widgetPaddingSlider
|
||||
text: I18n.tr("Widget Padding Base")
|
||||
description: I18n.tr("Material 3 Expressive padding")
|
||||
value: selectedBarConfig?.widgetPadding ?? 12
|
||||
minimum: 0
|
||||
maximum: 32
|
||||
unit: "px"
|
||||
defaultValue: 12
|
||||
opacity: (selectedBarConfig?.removeWidgetPadding ?? false) ? 0.5 : 1.0
|
||||
enabled: !(selectedBarConfig?.removeWidgetPadding ?? false)
|
||||
onSliderValueChanged: newValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetPadding: newValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: widgetPaddingSlider
|
||||
property: "value"
|
||||
value: selectedBarConfig?.widgetPadding ?? 12
|
||||
restoreMode: Binding.RestoreBinding
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 1
|
||||
@@ -1009,9 +873,11 @@ Item {
|
||||
minimum: 0
|
||||
maximum: 50
|
||||
defaultValue: 4
|
||||
onSliderValueChanged: newValue => {
|
||||
popupGapsManualDebounce.pendingValue = newValue;
|
||||
popupGapsManualDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
popupGapsManual: finalValue
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1048,6 +914,30 @@ Item {
|
||||
})
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Maximize Widget Icons")
|
||||
checked: selectedBarConfig?.maximizeWidgetIcons ?? false
|
||||
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||
maximizeWidgetIcons: checked
|
||||
})
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Maximize Widget Text")
|
||||
checked: selectedBarConfig?.maximizeWidgetText ?? false
|
||||
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||
maximizeWidgetText: checked
|
||||
})
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Remove Widget Padding")
|
||||
checked: selectedBarConfig?.removeWidgetPadding ?? false
|
||||
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||
removeWidgetPadding: checked
|
||||
})
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 1
|
||||
@@ -1086,9 +976,10 @@ Item {
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
defaultValue: 12
|
||||
onSliderValueChanged: newValue => {
|
||||
gothCornerRadiusDebounce.pendingValue = newValue;
|
||||
gothCornerRadiusDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
gothCornerRadiusValue: finalValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1282,9 +1173,10 @@ Item {
|
||||
maximum: 100
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderValueChanged: newValue => {
|
||||
borderOpacityDebounce.pendingValue = newValue / 100;
|
||||
borderOpacityDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
borderOpacity: finalValue / 100
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1303,9 +1195,10 @@ Item {
|
||||
maximum: 10
|
||||
unit: "px"
|
||||
defaultValue: 1
|
||||
onSliderValueChanged: newValue => {
|
||||
borderThicknessDebounce.pendingValue = newValue;
|
||||
borderThicknessDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
borderThickness: finalValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1370,9 +1263,10 @@ Item {
|
||||
maximum: 100
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderValueChanged: newValue => {
|
||||
widgetOutlineOpacityDebounce.pendingValue = newValue / 100;
|
||||
widgetOutlineOpacityDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetOutlineOpacity: finalValue / 100
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1391,9 +1285,10 @@ Item {
|
||||
maximum: 10
|
||||
unit: "px"
|
||||
defaultValue: 1
|
||||
onSliderValueChanged: newValue => {
|
||||
widgetOutlineThicknessDebounce.pendingValue = newValue;
|
||||
widgetOutlineThicknessDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetOutlineThickness: finalValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1419,9 +1314,11 @@ Item {
|
||||
maximum: 100
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderValueChanged: newValue => {
|
||||
barTransparencyDebounce.pendingValue = newValue / 100;
|
||||
barTransparencyDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
transparency: finalValue / 100
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1440,9 +1337,11 @@ Item {
|
||||
maximum: 100
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderValueChanged: newValue => {
|
||||
widgetTransparencyDebounce.pendingValue = newValue / 100;
|
||||
widgetTransparencyDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
widgetTransparency: finalValue / 100
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1465,9 +1364,11 @@ Item {
|
||||
value: Math.round((selectedBarConfig?.fontScale ?? 1.0) * 100)
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderValueChanged: newValue => {
|
||||
fontScaleDebounce.pendingValue = newValue / 100;
|
||||
fontScaleDebounce.restart();
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
fontScale: finalValue / 100
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
@@ -1477,6 +1378,32 @@ Item {
|
||||
restoreMode: Binding.RestoreBinding
|
||||
}
|
||||
}
|
||||
|
||||
SettingsSliderCard {
|
||||
id: iconScaleSliderCard
|
||||
iconName: "interests"
|
||||
title: I18n.tr("Icon Scale")
|
||||
description: I18n.tr("Scale DankBar icon sizes independently")
|
||||
visible: selectedBarConfig?.enabled
|
||||
minimum: 50
|
||||
maximum: 200
|
||||
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
||||
unit: "%"
|
||||
defaultValue: 100
|
||||
onSliderDragFinished: finalValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
iconScale: finalValue / 100
|
||||
});
|
||||
notifyHorizontalBarChange();
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: iconScaleSliderCard
|
||||
property: "value"
|
||||
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
||||
restoreMode: Binding.RestoreBinding
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ StyledRect {
|
||||
property int defaultValue: -1
|
||||
|
||||
signal sliderValueChanged(int newValue)
|
||||
|
||||
signal sliderDragFinished(int finalValue)
|
||||
width: parent?.width ?? 0
|
||||
height: Theme.spacingL * 2 + contentColumn.height
|
||||
radius: Theme.cornerRadius
|
||||
@@ -89,6 +89,7 @@ StyledRect {
|
||||
onClicked: {
|
||||
slider.value = root.defaultValue;
|
||||
root.sliderValueChanged(root.defaultValue);
|
||||
root.sliderDragFinished(root.defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,6 +102,7 @@ StyledRect {
|
||||
wheelEnabled: false
|
||||
thumbOutlineColor: Theme.surfaceContainerHigh
|
||||
onSliderValueChanged: newValue => root.sliderValueChanged(newValue)
|
||||
onSliderDragFinished: finalValue => root.sliderDragFinished(finalValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ Item {
|
||||
property int defaultValue: -1
|
||||
|
||||
signal sliderValueChanged(int newValue)
|
||||
|
||||
signal sliderDragFinished(int finalValue)
|
||||
width: parent?.width ?? 0
|
||||
height: headerRow.height + Theme.spacingXS + slider.height
|
||||
|
||||
@@ -128,6 +128,7 @@ Item {
|
||||
onClicked: {
|
||||
slider.value = root.defaultValue;
|
||||
root.sliderValueChanged(root.defaultValue);
|
||||
root.sliderDragFinished(root.defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,6 +142,7 @@ Item {
|
||||
wheelEnabled: false
|
||||
thumbOutlineColor: Theme.surfaceContainerHigh
|
||||
onSliderValueChanged: newValue => root.sliderValueChanged(newValue)
|
||||
onSliderDragFinished: finalValue => root.sliderDragFinished(finalValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user