mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Implement sizing mechanism for bar widget content
This commit is contained in:
@@ -108,6 +108,7 @@ Singleton {
|
|||||||
property string launcherLogoColorOverride: ""
|
property string launcherLogoColorOverride: ""
|
||||||
property real launcherLogoBrightness: 0.5
|
property real launcherLogoBrightness: 0.5
|
||||||
property real launcherLogoContrast: 1
|
property real launcherLogoContrast: 1
|
||||||
|
property int launcherLogoSizeOffset: 0
|
||||||
property bool weatherEnabled: true
|
property bool weatherEnabled: true
|
||||||
property string fontFamily: "Inter Variable"
|
property string fontFamily: "Inter Variable"
|
||||||
property string monoFontFamily: "Fira Code"
|
property string monoFontFamily: "Fira Code"
|
||||||
@@ -334,6 +335,7 @@ Singleton {
|
|||||||
launcherLogoColorOverride = settings.launcherLogoColorOverride !== undefined ? settings.launcherLogoColorOverride : ""
|
launcherLogoColorOverride = settings.launcherLogoColorOverride !== undefined ? settings.launcherLogoColorOverride : ""
|
||||||
launcherLogoBrightness = settings.launcherLogoBrightness !== undefined ? settings.launcherLogoBrightness : 0.5
|
launcherLogoBrightness = settings.launcherLogoBrightness !== undefined ? settings.launcherLogoBrightness : 0.5
|
||||||
launcherLogoContrast = settings.launcherLogoContrast !== undefined ? settings.launcherLogoContrast : 1
|
launcherLogoContrast = settings.launcherLogoContrast !== undefined ? settings.launcherLogoContrast : 1
|
||||||
|
launcherLogoSizeOffset = settings.launcherLogoSizeOffset !== undefined ? settings.launcherLogoSizeOffset : 0
|
||||||
}
|
}
|
||||||
fontFamily = settings.fontFamily !== undefined ? settings.fontFamily : defaultFontFamily
|
fontFamily = settings.fontFamily !== undefined ? settings.fontFamily : defaultFontFamily
|
||||||
monoFontFamily = settings.monoFontFamily !== undefined ? settings.monoFontFamily : defaultMonoFontFamily
|
monoFontFamily = settings.monoFontFamily !== undefined ? settings.monoFontFamily : defaultMonoFontFamily
|
||||||
@@ -459,6 +461,7 @@ Singleton {
|
|||||||
"launcherLogoColorOverride": launcherLogoColorOverride,
|
"launcherLogoColorOverride": launcherLogoColorOverride,
|
||||||
"launcherLogoBrightness": launcherLogoBrightness,
|
"launcherLogoBrightness": launcherLogoBrightness,
|
||||||
"launcherLogoContrast": launcherLogoContrast,
|
"launcherLogoContrast": launcherLogoContrast,
|
||||||
|
"launcherLogoSizeOffset": launcherLogoSizeOffset,
|
||||||
"fontFamily": fontFamily,
|
"fontFamily": fontFamily,
|
||||||
"monoFontFamily": monoFontFamily,
|
"monoFontFamily": monoFontFamily,
|
||||||
"fontWeight": fontWeight,
|
"fontWeight": fontWeight,
|
||||||
@@ -984,6 +987,11 @@ Singleton {
|
|||||||
saveSettings()
|
saveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setLauncherLogoSizeOffset(offset) {
|
||||||
|
launcherLogoSizeOffset = offset
|
||||||
|
saveSettings()
|
||||||
|
}
|
||||||
|
|
||||||
function setFontFamily(family) {
|
function setFontFamily(family) {
|
||||||
fontFamily = family
|
fontFamily = family
|
||||||
saveSettings()
|
saveSettings()
|
||||||
|
|||||||
@@ -473,6 +473,18 @@ 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) {
|
||||||
|
const defaultOffset = offset !== undefined ? offset : -6
|
||||||
|
return Math.round((barThickness / 48) * (iconSize + defaultOffset))
|
||||||
|
}
|
||||||
|
|
||||||
|
function barTextSize(barThickness) {
|
||||||
|
const scale = barThickness / 48
|
||||||
|
if (scale <= 0.75) return fontSizeSmall * 0.9
|
||||||
|
if (scale >= 1.25) return fontSizeMedium
|
||||||
|
return fontSizeSmall
|
||||||
|
}
|
||||||
|
|
||||||
function getBatteryIcon(level, isCharging, batteryAvailable) {
|
function getBatteryIcon(level, isCharging, batteryAvailable) {
|
||||||
if (!batteryAvailable)
|
if (!batteryAvailable)
|
||||||
return _getBatteryPowerProfileIcon()
|
return _getBatteryPowerProfileIcon()
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: BatteryService.getBatteryIcon()
|
name: BatteryService.getBatteryIcon()
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (!BatteryService.batteryAvailable) {
|
if (!BatteryService.batteryAvailable) {
|
||||||
return Theme.surfaceText
|
return Theme.surfaceText
|
||||||
@@ -61,7 +61,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: BatteryService.batteryLevel.toString()
|
text: BatteryService.batteryLevel.toString()
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -77,7 +77,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: BatteryService.getBatteryIcon()
|
name: BatteryService.getBatteryIcon()
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: {
|
color: {
|
||||||
if (!BatteryService.batteryAvailable) {
|
if (!BatteryService.batteryAvailable) {
|
||||||
return Theme.surfaceText;
|
return Theme.surfaceText;
|
||||||
@@ -98,7 +98,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: `${BatteryService.batteryLevel}%`
|
text: `${BatteryService.batteryLevel}%`
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Item {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
name: "content_paste"
|
name: "content_paste"
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Rectangle {
|
|||||||
return String(display).padStart(2, '0').charAt(0)
|
return String(display).padStart(2, '0').charAt(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Normal
|
font.weight: Font.Normal
|
||||||
width: 9
|
width: 9
|
||||||
@@ -67,7 +67,7 @@ Rectangle {
|
|||||||
return String(display).padStart(2, '0').charAt(1)
|
return String(display).padStart(2, '0').charAt(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Normal
|
font.weight: Font.Normal
|
||||||
width: 9
|
width: 9
|
||||||
@@ -81,7 +81,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(0)
|
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(0)
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Normal
|
font.weight: Font.Normal
|
||||||
width: 9
|
width: 9
|
||||||
@@ -90,7 +90,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(1)
|
text: String(systemClock?.date?.getMinutes()).padStart(2, '0').charAt(1)
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Normal
|
font.weight: Font.Normal
|
||||||
width: 9
|
width: 9
|
||||||
@@ -123,7 +123,7 @@ Rectangle {
|
|||||||
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0')
|
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0')
|
||||||
return value.charAt(0)
|
return value.charAt(0)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
width: 9
|
width: 9
|
||||||
@@ -138,7 +138,7 @@ Rectangle {
|
|||||||
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0')
|
const value = dayFirst ? String(systemClock?.date?.getDate()).padStart(2, '0') : String(systemClock?.date?.getMonth() + 1).padStart(2, '0')
|
||||||
return value.charAt(1)
|
return value.charAt(1)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
width: 9
|
width: 9
|
||||||
@@ -158,7 +158,7 @@ Rectangle {
|
|||||||
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0')
|
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0')
|
||||||
return value.charAt(0)
|
return value.charAt(0)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
width: 9
|
width: 9
|
||||||
@@ -173,7 +173,7 @@ Rectangle {
|
|||||||
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0')
|
const value = dayFirst ? String(systemClock?.date?.getMonth() + 1).padStart(2, '0') : String(systemClock?.date?.getDate()).padStart(2, '0')
|
||||||
return value.charAt(1)
|
return value.charAt(1)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
width: 9
|
width: 9
|
||||||
@@ -194,7 +194,7 @@ Rectangle {
|
|||||||
const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
|
const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
|
||||||
return systemClock?.date?.toLocaleTimeString(Qt.locale(), format)
|
return systemClock?.date?.toLocaleTimeString(Qt.locale(), format)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeMedium - 1
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -215,7 +215,7 @@ Rectangle {
|
|||||||
|
|
||||||
return systemClock?.date?.toLocaleDateString(Qt.locale(), "ddd d")
|
return systemClock?.date?.toLocaleDateString(Qt.locale(), "ddd d")
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeMedium - 1
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !SettingsData.clockCompactMode
|
visible: !SettingsData.clockCompactMode
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
name: "palette"
|
name: "palette"
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: colorPickerArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
color: colorPickerArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Rectangle {
|
|||||||
|
|
||||||
return NetworkService.wifiSignalIcon
|
return NetworkService.wifiSignalIcon
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (NetworkService.wifiToggling) {
|
if (NetworkService.wifiToggling) {
|
||||||
return Theme.primary
|
return Theme.primary
|
||||||
@@ -66,7 +66,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "bluetooth"
|
name: "bluetooth"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: BluetoothService.enabled ? Theme.primary : Theme.outlineButton
|
color: BluetoothService.enabled ? Theme.primary : Theme.outlineButton
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
||||||
@@ -94,7 +94,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return "volume_up"
|
return "volume_up"
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "settings"
|
name: "settings"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: controlCenterArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
color: controlCenterArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon
|
visible: !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon
|
||||||
@@ -151,7 +151,7 @@ Rectangle {
|
|||||||
|
|
||||||
return NetworkService.wifiSignalIcon;
|
return NetworkService.wifiSignalIcon;
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (NetworkService.wifiToggling) {
|
if (NetworkService.wifiToggling) {
|
||||||
return Theme.primary;
|
return Theme.primary;
|
||||||
@@ -169,7 +169,7 @@ Rectangle {
|
|||||||
id: bluetoothIcon
|
id: bluetoothIcon
|
||||||
|
|
||||||
name: "bluetooth"
|
name: "bluetooth"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: BluetoothService.enabled ? Theme.primary : Theme.outlineButton
|
color: BluetoothService.enabled ? Theme.primary : Theme.outlineButton
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
||||||
@@ -197,7 +197,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return "volume_up";
|
return "volume_up";
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "mic"
|
name: "mic"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: false // TODO: Add mic detection
|
visible: false // TODO: Add mic detection
|
||||||
@@ -239,7 +239,7 @@ Rectangle {
|
|||||||
// Fallback settings icon when all other icons are hidden
|
// Fallback settings icon when all other icons are hidden
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "settings"
|
name: "settings"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: controlCenterArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
color: controlCenterArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon
|
visible: !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "memory"
|
name: "memory"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.cpuUsage > 80) {
|
if (DgopService.cpuUsage > 80) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -91,7 +91,7 @@ Rectangle {
|
|||||||
|
|
||||||
return DgopService.cpuUsage.toFixed(0);
|
return DgopService.cpuUsage.toFixed(0);
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -106,7 +106,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "memory"
|
name: "memory"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.cpuUsage > 80) {
|
if (DgopService.cpuUsage > 80) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -129,7 +129,7 @@ Rectangle {
|
|||||||
|
|
||||||
return DgopService.cpuUsage.toFixed(0) + "%";
|
return DgopService.cpuUsage.toFixed(0) + "%";
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -138,7 +138,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: cpuBaseline
|
id: cpuBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "100%"
|
text: "100%"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "device_thermostat"
|
name: "device_thermostat"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.cpuTemperature > 85) {
|
if (DgopService.cpuTemperature > 85) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -91,7 +91,7 @@ Rectangle {
|
|||||||
|
|
||||||
return Math.round(DgopService.cpuTemperature).toString();
|
return Math.round(DgopService.cpuTemperature).toString();
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -106,7 +106,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "device_thermostat"
|
name: "device_thermostat"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.cpuTemperature > 85) {
|
if (DgopService.cpuTemperature > 85) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -129,7 +129,7 @@ Rectangle {
|
|||||||
|
|
||||||
return Math.round(DgopService.cpuTemperature) + "°";
|
return Math.round(DgopService.cpuTemperature) + "°";
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -138,7 +138,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: tempBaseline
|
id: tempBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "100°"
|
text: "100°"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Rectangle {
|
|||||||
property var widgetData: null
|
property var widgetData: null
|
||||||
property var parentScreen: null
|
property var parentScreen: null
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
property string mountPath: (widgetData && widgetData.mountPath !== undefined) ? widgetData.mountPath : "/"
|
property string mountPath: (widgetData && widgetData.mountPath !== undefined) ? widgetData.mountPath : "/"
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "storage"
|
name: "storage"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (root.diskUsagePercent > 90) {
|
if (root.diskUsagePercent > 90) {
|
||||||
return Theme.tempDanger
|
return Theme.tempDanger
|
||||||
@@ -164,7 +165,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return root.diskUsagePercent.toFixed(0)
|
return root.diskUsagePercent.toFixed(0)
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -179,7 +180,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "storage"
|
name: "storage"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (root.diskUsagePercent > 90) {
|
if (root.diskUsagePercent > 90) {
|
||||||
return Theme.tempDanger
|
return Theme.tempDanger
|
||||||
@@ -199,7 +200,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return root.selectedMount.mount
|
return root.selectedMount.mount
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -214,7 +215,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return root.diskUsagePercent.toFixed(0) + "%"
|
return root.diskUsagePercent.toFixed(0) + "%"
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -223,7 +224,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: diskBaseline
|
id: diskBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "100%"
|
text: "100%"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Rectangle {
|
|||||||
property bool compactMode: SettingsData.focusedWindowCompactMode
|
property bool compactMode: SettingsData.focusedWindowCompactMode
|
||||||
property int availableWidth: 400
|
property int availableWidth: 400
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
||||||
readonly property int baseWidth: contentRow.implicitWidth + horizontalPadding * 2
|
readonly property int baseWidth: contentRow.implicitWidth + horizontalPadding * 2
|
||||||
readonly property int maxNormalWidth: 456
|
readonly property int maxNormalWidth: 456
|
||||||
@@ -171,7 +172,7 @@ Rectangle {
|
|||||||
const desktopEntry = DesktopEntries.heuristicLookup(activeWindow.appId);
|
const desktopEntry = DesktopEntries.heuristicLookup(activeWindow.appId);
|
||||||
return desktopEntry && desktopEntry.name ? desktopEntry.name : activeWindow.appId;
|
return desktopEntry && desktopEntry.name ? desktopEntry.name : activeWindow.appId;
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -183,7 +184,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "•"
|
text: "•"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.outlineButton
|
color: Theme.outlineButton
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !compactMode && appText.text && titleText.text
|
visible: !compactMode && appText.text && titleText.text
|
||||||
@@ -209,7 +210,7 @@ Rectangle {
|
|||||||
|
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "auto_awesome_mosaic"
|
name: "auto_awesome_mosaic"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (root.displayTemp > 80) {
|
if (root.displayTemp > 80) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -158,7 +158,7 @@ Rectangle {
|
|||||||
|
|
||||||
return Math.round(root.displayTemp).toString();
|
return Math.round(root.displayTemp).toString();
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -173,7 +173,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "auto_awesome_mosaic"
|
name: "auto_awesome_mosaic"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (root.displayTemp > 80) {
|
if (root.displayTemp > 80) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -196,7 +196,7 @@ Rectangle {
|
|||||||
|
|
||||||
return Math.round(root.displayTemp) + "°";
|
return Math.round(root.displayTemp) + "°";
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -205,7 +205,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: gpuTempBaseline
|
id: gpuTempBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "100°"
|
text: "100°"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Rectangle {
|
|||||||
|
|
||||||
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.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Rectangle {
|
|||||||
property bool isVertical: axis?.isVertical ?? false
|
property bool isVertical: axis?.isVertical ?? false
|
||||||
property var axis: null
|
property var axis: null
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||||
property string currentLayout: ""
|
property string currentLayout: ""
|
||||||
property string hyprlandKeyboard: ""
|
property string hyprlandKeyboard: ""
|
||||||
@@ -59,7 +60,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "keyboard"
|
name: "keyboard"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
@@ -73,7 +74,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return currentLayout.substring(0, 2).toUpperCase()
|
return currentLayout.substring(0, 2).toUpperCase()
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -89,7 +90,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: currentLayout
|
text: currentLayout
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ Item {
|
|||||||
visible: SettingsData.launcherLogoMode === "apps"
|
visible: SettingsData.launcherLogoMode === "apps"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
name: "apps"
|
name: "apps"
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemLogo {
|
SystemLogo {
|
||||||
visible: SettingsData.launcherLogoMode === "os"
|
visible: SettingsData.launcherLogoMode === "os"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Theme.iconSize - 3
|
width: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
height: Theme.iconSize - 3
|
height: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
colorOverride: SettingsData.launcherLogoColorOverride
|
colorOverride: SettingsData.launcherLogoColorOverride
|
||||||
brightnessOverride: SettingsData.launcherLogoBrightness
|
brightnessOverride: SettingsData.launcherLogoBrightness
|
||||||
contrastOverride: SettingsData.launcherLogoContrast
|
contrastOverride: SettingsData.launcherLogoContrast
|
||||||
@@ -77,8 +77,8 @@ Item {
|
|||||||
IconImage {
|
IconImage {
|
||||||
visible: SettingsData.launcherLogoMode === "compositor"
|
visible: SettingsData.launcherLogoMode === "compositor"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Theme.iconSize - 3
|
width: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
height: Theme.iconSize - 3
|
height: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: {
|
source: {
|
||||||
@@ -101,8 +101,8 @@ Item {
|
|||||||
IconImage {
|
IconImage {
|
||||||
visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== ""
|
visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== ""
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Theme.iconSize - 3
|
width: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
height: Theme.iconSize - 3
|
height: Theme.barIconSize(barThickness, SettingsData.launcherLogoSizeOffset)
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : ""
|
source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : ""
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: textContainer.displayText
|
text: textContainer.displayText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Rectangle {
|
|||||||
readonly property int baseWidth: contentRow.implicitWidth + Theme.spacingS * 2
|
readonly property int baseWidth: contentRow.implicitWidth + Theme.spacingS * 2
|
||||||
readonly property int maxNormalWidth: 456
|
readonly property int maxNormalWidth: 456
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||||
|
|
||||||
function formatNetworkSpeed(bytesPerSec) {
|
function formatNetworkSpeed(bytesPerSec) {
|
||||||
@@ -63,7 +64,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "network_check"
|
name: "network_check"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
@@ -75,7 +76,7 @@ Rectangle {
|
|||||||
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
||||||
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.info
|
color: Theme.info
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -88,7 +89,7 @@ Rectangle {
|
|||||||
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
if (rate < 1024 * 1024) return (rate / 1024).toFixed(0) + "K"
|
||||||
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
return (rate / (1024 * 1024)).toFixed(0) + "M"
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.error
|
color: Theme.error
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -104,7 +105,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "network_check"
|
name: "network_check"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -115,13 +116,13 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "↓"
|
text: "↓"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.info
|
color: Theme.info
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: DgopService.networkRxRate > 0 ? formatNetworkSpeed(DgopService.networkRxRate) : "0 B/s"
|
text: DgopService.networkRxRate > 0 ? formatNetworkSpeed(DgopService.networkRxRate) : "0 B/s"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -131,7 +132,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: rxBaseline
|
id: rxBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "88.8 MB/s"
|
text: "88.8 MB/s"
|
||||||
}
|
}
|
||||||
@@ -154,13 +155,13 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "↑"
|
text: "↑"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.error
|
color: Theme.error
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: DgopService.networkTxRate > 0 ? formatNetworkSpeed(DgopService.networkTxRate) : "0 B/s"
|
text: DgopService.networkTxRate > 0 ? formatNetworkSpeed(DgopService.networkTxRate) : "0 B/s"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -170,7 +171,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: txBaseline
|
id: txBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "88.8 MB/s"
|
text: "88.8 MB/s"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
name: "assignment"
|
name: "assignment"
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: notepadArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
color: notepadArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Item {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
name: SessionData.doNotDisturb ? "notifications_off" : "notifications"
|
name: SessionData.doNotDisturb ? "notifications_off" : "notifications"
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: SessionData.doNotDisturb ? Theme.error : (notificationArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText)
|
color: SessionData.doNotDisturb ? Theme.error : (notificationArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Rectangle {
|
|||||||
property var popupTarget: null
|
property var popupTarget: null
|
||||||
property var parentScreen: null
|
property var parentScreen: null
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
||||||
readonly property bool hasActivePrivacy: PrivacyService.anyPrivacyActive
|
readonly property bool hasActivePrivacy: PrivacyService.anyPrivacyActive
|
||||||
readonly property int activeCount: PrivacyService.microphoneActive + PrivacyService.cameraActive + PrivacyService.screensharingActive
|
readonly property int activeCount: PrivacyService.microphoneActive + PrivacyService.cameraActive + PrivacyService.screensharingActive
|
||||||
@@ -198,7 +199,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: PrivacyService.getPrivacySummary()
|
text: PrivacyService.getPrivacySummary()
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "developer_board"
|
name: "developer_board"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.memoryUsage > 90) {
|
if (DgopService.memoryUsage > 90) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -92,7 +92,7 @@ Rectangle {
|
|||||||
|
|
||||||
return DgopService.memoryUsage.toFixed(0);
|
return DgopService.memoryUsage.toFixed(0);
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -107,7 +107,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: "developer_board"
|
name: "developer_board"
|
||||||
size: Theme.iconSize - 8
|
size: Theme.barIconSize(barThickness)
|
||||||
color: {
|
color: {
|
||||||
if (DgopService.memoryUsage > 90) {
|
if (DgopService.memoryUsage > 90) {
|
||||||
return Theme.tempDanger;
|
return Theme.tempDanger;
|
||||||
@@ -130,7 +130,7 @@ Rectangle {
|
|||||||
|
|
||||||
return DgopService.memoryUsage.toFixed(0) + "%";
|
return DgopService.memoryUsage.toFixed(0) + "%";
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -139,7 +139,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledTextMetrics {
|
StyledTextMetrics {
|
||||||
id: ramBaseline
|
id: ramBaseline
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
text: "100%"
|
text: "100%"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Rectangle {
|
|||||||
property var hoveredItem: null
|
property var hoveredItem: null
|
||||||
property var topBar: null
|
property var topBar: null
|
||||||
property real widgetThickness: 30
|
property real widgetThickness: 30
|
||||||
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
||||||
property Item windowRoot: (Window.window ? Window.window.contentItem : null)
|
property Item windowRoot: (Window.window ? Window.window.contentItem : null)
|
||||||
readonly property var sortedToplevels: {
|
readonly property var sortedToplevels: {
|
||||||
@@ -272,7 +273,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !SettingsData.runningAppsCompactMode
|
visible: !SettingsData.runningAppsCompactMode
|
||||||
text: windowTitle
|
text: windowTitle
|
||||||
font.pixelSize: Theme.fontSizeMedium - 1
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -463,7 +464,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !SettingsData.runningAppsCompactMode
|
visible: !SettingsData.runningAppsCompactMode
|
||||||
text: windowTitle
|
text: windowTitle
|
||||||
font.pixelSize: Theme.fontSizeMedium - 1
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Rectangle {
|
|||||||
if (hasUpdates) return "system_update_alt";
|
if (hasUpdates) return "system_update_alt";
|
||||||
return "check_circle";
|
return "check_circle";
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: {
|
color: {
|
||||||
if (SystemUpdateService.hasError) return Theme.error;
|
if (SystemUpdateService.hasError) return Theme.error;
|
||||||
if (hasUpdates) return Theme.primary;
|
if (hasUpdates) return Theme.primary;
|
||||||
@@ -97,7 +97,7 @@ Rectangle {
|
|||||||
if (hasUpdates) return "system_update_alt";
|
if (hasUpdates) return "system_update_alt";
|
||||||
return "check_circle";
|
return "check_circle";
|
||||||
}
|
}
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: {
|
color: {
|
||||||
if (SystemUpdateService.hasError) return Theme.error;
|
if (SystemUpdateService.hasError) return Theme.error;
|
||||||
if (hasUpdates) return Theme.primary;
|
if (hasUpdates) return Theme.primary;
|
||||||
@@ -127,7 +127,7 @@ Rectangle {
|
|||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: SystemUpdateService.updateCount.toString()
|
text: SystemUpdateService.updateCount.toString()
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
visible: hasUpdates && !isChecking
|
visible: hasUpdates && !isChecking
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Rectangle {
|
|||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off")
|
name: VpnService.isBusy ? "sync" : (VpnService.connected ? "vpn_lock" : "vpn_key_off")
|
||||||
size: Theme.iconSize - 6
|
size: Theme.barIconSize(barThickness, -4)
|
||||||
color: VpnService.connected ? Theme.primary : Theme.surfaceText
|
color: VpnService.connected ? Theme.primary : Theme.surfaceText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
||||||
size: Theme.iconSize - 4
|
size: Theme.barIconSize(barThickness, -6)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ Rectangle {
|
|||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
name: WeatherService.getWeatherIcon(WeatherService.weather.wCode)
|
||||||
size: Theme.iconSize - 4
|
size: Theme.barIconSize(barThickness, -6)
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ Rectangle {
|
|||||||
|
|
||||||
return temp + "°" + (SettingsData.useFahrenheit ? "F" : "C");
|
return temp + "°" + (SettingsData.useFahrenheit ? "F" : "C");
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Rectangle {
|
|||||||
property var axis: null
|
property var axis: null
|
||||||
property string screenName: ""
|
property string screenName: ""
|
||||||
property real widgetHeight: 30
|
property real widgetHeight: 30
|
||||||
|
property real barThickness: 48
|
||||||
property int currentWorkspace: {
|
property int currentWorkspace: {
|
||||||
if (CompositorService.isNiri) {
|
if (CompositorService.isNiri) {
|
||||||
return getNiriActiveWorkspace()
|
return getNiriActiveWorkspace()
|
||||||
@@ -611,7 +612,7 @@ Rectangle {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: loadedIconData ? loadedIconData.value : "" // NULL CHECK
|
text: loadedIconData ? loadedIconData.value : "" // NULL CHECK
|
||||||
color: isActive ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : Theme.surfaceTextMedium
|
color: isActive ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : Theme.surfaceTextMedium
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -633,7 +634,7 @@ Rectangle {
|
|||||||
return CompositorService.isHyprland ? (modelData?.id || "") : (modelData - 1);
|
return CompositorService.isHyprland ? (modelData?.id || "") : (modelData - 1);
|
||||||
}
|
}
|
||||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.barTextSize(barThickness)
|
||||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ Item {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: slidersRow
|
id: slidersRow
|
||||||
spacing: Theme.spacingL
|
spacing: Theme.spacingS
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
@@ -218,7 +218,7 @@ Item {
|
|||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (PopoutService.colorPickerModal) {
|
if (PopoutService.colorPickerModal) {
|
||||||
PopoutService.colorPickerModal.selectedColor = SettingsData.launcherLogoColorOverride !== "" ? SettingsData.launcherLogoColorOverride : Theme.primary
|
PopoutService.colorPickerModal.selectedColor = SettingsData.launcherLogoColorOverride !== "" ? SettingsData.launcherLogoColorOverride : Qt.rgba(0, 0, 0, 0)
|
||||||
PopoutService.colorPickerModal.pickerTitle = qsTr("Choose Launcher Logo Color")
|
PopoutService.colorPickerModal.pickerTitle = qsTr("Choose Launcher Logo Color")
|
||||||
PopoutService.colorPickerModal.onColorSelectedCallback = function(selectedColor) {
|
PopoutService.colorPickerModal.onColorSelectedCallback = function(selectedColor) {
|
||||||
SettingsData.setLauncherLogoColorOverride(selectedColor)
|
SettingsData.setLauncherLogoColorOverride(selectedColor)
|
||||||
@@ -230,6 +230,35 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
width: 120
|
||||||
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: qsTr("Size Offset")
|
||||||
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
color: Theme.surfaceText
|
||||||
|
font.weight: Font.Medium
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
DankSlider {
|
||||||
|
width: 100
|
||||||
|
height: 20
|
||||||
|
minimum: -12
|
||||||
|
maximum: 12
|
||||||
|
value: SettingsData.launcherLogoSizeOffset
|
||||||
|
unit: ""
|
||||||
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
|
thumbOutlineColor: Theme.surfaceContainerHigh
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
onSliderValueChanged: newValue => {
|
||||||
|
SettingsData.setLauncherLogoSizeOffset(newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: 120
|
width: 120
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|||||||
Reference in New Issue
Block a user