1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

dock: fix auto-hide hit area

media osd: fix showing without album art
This commit is contained in:
bbedward
2026-02-11 17:50:57 -05:00
parent 46bb3b613b
commit 0133c19276
4 changed files with 35 additions and 18 deletions

View File

@@ -303,22 +303,21 @@ Variants {
id: maskItem
parent: dock.contentItem
visible: false
readonly property bool expanded: dock.reveal
x: {
const baseX = dockCore.x + dockMouseArea.x;
if (isVertical && SettingsData.dockPosition === SettingsData.Position.Right) {
return baseX - animationHeadroom - borderThickness;
}
return baseX - borderThickness;
if (isVertical && SettingsData.dockPosition === SettingsData.Position.Right)
return baseX - (expanded ? animationHeadroom + borderThickness : 0);
return baseX - (expanded ? borderThickness : 0);
}
y: {
const baseY = dockCore.y + dockMouseArea.y;
if (!isVertical && SettingsData.dockPosition === SettingsData.Position.Bottom) {
return baseY - animationHeadroom - borderThickness;
}
return baseY - borderThickness;
if (!isVertical && SettingsData.dockPosition === SettingsData.Position.Bottom)
return baseY - (expanded ? animationHeadroom + borderThickness : 0);
return baseY - (expanded ? borderThickness : 0);
}
width: dockMouseArea.width + (isVertical ? animationHeadroom : 0) + borderThickness * 2
height: dockMouseArea.height + (!isVertical ? animationHeadroom : 0) + borderThickness * 2
width: dockMouseArea.width + (isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 : 0)
height: dockMouseArea.height + (!isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 : 0)
}
mask: Region {

View File

@@ -38,6 +38,14 @@ DankOSD {
property bool _pendingShow: false
Image {
id: artPreloader
source: TrackArtService._bgArtSource
visible: false
asynchronous: true
cache: true
}
onPlayerChanged: {
if (!player) {
_pendingShow = false;
@@ -48,7 +56,21 @@ DankOSD {
Connections {
target: TrackArtService
function onLoadingChanged() {
if (!TrackArtService.loading && root._pendingShow) {
if (TrackArtService.loading || !root._pendingShow)
return;
if (!TrackArtService._bgArtSource || artPreloader.status !== Image.Loading) {
root._pendingShow = false;
root.show();
}
}
}
Connections {
target: artPreloader
function onStatusChanged() {
if (!root._pendingShow || TrackArtService.loading)
return;
if (artPreloader.status !== Image.Loading) {
root._pendingShow = false;
root.show();
}