1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-07 19:59:14 -04:00

fix(osd): size from PanelWindow.screen (#2582)

This commit is contained in:
Connor Welsh
2026-06-05 23:14:51 -04:00
committed by GitHub
parent f5295fb35d
commit bf3ce6deb2
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ DankOSD {
property string deviceName: "" property string deviceName: ""
property string deviceIcon: "speaker" property string deviceIcon: "speaker"
osdWidth: Math.min(Math.max(120, Theme.iconSize + textMetrics.width + Theme.spacingS * 4), Screen.width - Theme.spacingM * 2) osdWidth: Math.min(Math.max(120, Theme.iconSize + textMetrics.width + Theme.spacingS * 4), screenWidth - Theme.spacingM * 2)
osdHeight: 40 + Theme.spacingS * 2 osdHeight: 40 + Theme.spacingS * 2
autoHideInterval: 2500 autoHideInterval: 2500
enableMouseInteraction: false enableMouseInteraction: false
+2 -2
View File
@@ -13,8 +13,8 @@ DankOSD {
_displayBrightness = DisplayService.brightnessLevel; _displayBrightness = DisplayService.brightnessLevel;
} }
osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, Screen.width - Theme.spacingM * 2) osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, screenWidth - Theme.spacingM * 2)
osdHeight: useVertical ? Math.min(260, Screen.height - Theme.spacingM * 2) : (40 + Theme.spacingS * 2) osdHeight: useVertical ? Math.min(260, screenHeight - Theme.spacingM * 2) : (40 + Theme.spacingS * 2)
autoHideInterval: 3000 autoHideInterval: 3000
enableMouseInteraction: true enableMouseInteraction: true
+1 -1
View File
@@ -11,7 +11,7 @@ DankOSD {
readonly property bool useVertical: isVerticalLayout readonly property bool useVertical: isVerticalLayout
readonly property var player: MprisController.activePlayer readonly property var player: MprisController.activePlayer
osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(280, Screen.width - Theme.spacingM * 2) osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(280, screenWidth - Theme.spacingM * 2)
osdHeight: useVertical ? (Theme.iconSize * 2) : (40 + Theme.spacingS * 2) osdHeight: useVertical ? (Theme.iconSize * 2) : (40 + Theme.spacingS * 2)
autoHideInterval: 3000 autoHideInterval: 3000
enableMouseInteraction: true enableMouseInteraction: true
+2 -2
View File
@@ -30,8 +30,8 @@ DankOSD {
onTriggered: _suppressNewPlayer = false onTriggered: _suppressNewPlayer = false
} }
osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, Screen.width - Theme.spacingM * 2) osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, screenWidth - Theme.spacingM * 2)
osdHeight: useVertical ? Math.min(260, Screen.height - Theme.spacingM * 2) : (40 + Theme.spacingS * 2) osdHeight: useVertical ? Math.min(260, screenHeight - Theme.spacingM * 2) : (40 + Theme.spacingS * 2)
autoHideInterval: 3000 autoHideInterval: 3000
enableMouseInteraction: true enableMouseInteraction: true
+2 -2
View File
@@ -15,8 +15,8 @@ DankOSD {
_displayVolume = Math.round(AudioService.source.audio.volume * 100); _displayVolume = Math.round(AudioService.source.audio.volume * 100);
} }
osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, Screen.width - Theme.spacingM * 2) osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, screenWidth - Theme.spacingM * 2)
osdHeight: useVertical ? Math.min(260, Screen.height - Theme.spacingM * 2) : (40 + Theme.spacingS * 2) osdHeight: useVertical ? Math.min(260, screenHeight - Theme.spacingM * 2) : (40 + Theme.spacingS * 2)
autoHideInterval: 3000 autoHideInterval: 3000
enableMouseInteraction: true enableMouseInteraction: true
+2 -2
View File
@@ -15,8 +15,8 @@ DankOSD {
_displayVolume = Math.min(AudioService.sinkMaxVolume, Math.round(AudioService.sink.audio.volume * 100)); _displayVolume = Math.min(AudioService.sinkMaxVolume, Math.round(AudioService.sink.audio.volume * 100));
} }
osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, Screen.width - Theme.spacingM * 2) osdWidth: useVertical ? (40 + Theme.spacingS * 2) : Math.min(260, screenWidth - Theme.spacingM * 2)
osdHeight: useVertical ? Math.min(260, Screen.height - Theme.spacingM * 2) : (40 + Theme.spacingS * 2) osdHeight: useVertical ? Math.min(260, screenHeight - Theme.spacingM * 2) : (40 + Theme.spacingS * 2)
autoHideInterval: 3000 autoHideInterval: 3000
enableMouseInteraction: true enableMouseInteraction: true