mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat: unify media controls dropdown interactions, hover behavior and cycle controls (#2470)
* feat: unify media controls dropdown interactions, hover behavior and cycle controls - Implement hover-to-show and hover-to-hide for all media control dropdowns. - Make clicking the Output Devices and Media Players buttons cycle through items when expanded. - Always display the 'speaker' icon for Output Devices to maintain visual consistency. - Bind dropdown player properties dynamically to fix list stale rendering states. * fix(DankDash): use trackArtist property for artist label in MediaPlayerTab * fix(DankDash): simplify active player label for consistency with output devices * feat(DankDash): display volume levels for audio output devices in dropdown * fix(DankDash): display Unknown Artist when artist is empty in player list * feat(DankDash): add keyboard shortcuts for seeking, track cycling and playback control in Media popout * feat(DankDash): change Up/Down arrow keys to adjust volume in Media popout * feat(DankDash): auto-open volume dropdown overlay when using Up/Down shortcuts * feat(DankDash): add Key M shortcut to toggle mute in Media popout * fix(mpris): clamp minimum seek position to 0.1s to prevent browser player reset * fix(mpris): cache stable length to prevent browser transient reset issues * fix(mpris): persist activePlayerStableLength in MprisController singleton * fix(mpris): resolve browser player album art with raw metadata and YouTube url fallbacks * fix(mpris): resolve browser player album art with local caching and 16:9 youtube fallbacks * style(mpris): trim trailing whitespace in TrackArtService * fix(mpris): address code review feedback on remote caching, stale artwork, and hover state * fix: secure curl commands and prevent premature dropdown overlays closing on button re-hover
This commit is contained in:
@@ -60,7 +60,7 @@ DankOSD {
|
||||
|
||||
Image {
|
||||
id: artPreloader
|
||||
source: TrackArtService._bgArtSource
|
||||
source: TrackArtService.resolvedArtUrl
|
||||
visible: false
|
||||
asynchronous: true
|
||||
cache: true
|
||||
@@ -78,7 +78,7 @@ DankOSD {
|
||||
function onLoadingChanged() {
|
||||
if (TrackArtService.loading || !root._pendingShow)
|
||||
return;
|
||||
if (!TrackArtService._bgArtSource || artPreloader.status === Image.Ready) {
|
||||
if (!TrackArtService.resolvedArtUrl || artPreloader.status === Image.Ready) {
|
||||
root._pendingShow = false;
|
||||
root.show();
|
||||
}
|
||||
@@ -116,9 +116,9 @@ DankOSD {
|
||||
root._displayAlbum = player.trackAlbum || "";
|
||||
|
||||
root.updatePlaybackIcon();
|
||||
TrackArtService.loadArtwork(player.trackArtUrl);
|
||||
const resolvedArtUrl = TrackArtService.resolvedArtUrl;
|
||||
|
||||
if (!player.trackArtUrl || player.trackArtUrl === "") {
|
||||
if (!resolvedArtUrl || resolvedArtUrl === "") {
|
||||
root.show();
|
||||
return;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ DankOSD {
|
||||
root._pendingShow = true;
|
||||
return;
|
||||
}
|
||||
if (!TrackArtService._bgArtSource || artPreloader.status === Image.Ready) {
|
||||
if (!TrackArtService.resolvedArtUrl || artPreloader.status === Image.Ready) {
|
||||
root.show();
|
||||
return;
|
||||
}
|
||||
@@ -134,7 +134,10 @@ DankOSD {
|
||||
}
|
||||
|
||||
function onTrackArtUrlChanged() {
|
||||
TrackArtService.loadArtwork(player.trackArtUrl);
|
||||
handleUpdate();
|
||||
}
|
||||
function onMetadataChanged() {
|
||||
handleUpdate();
|
||||
}
|
||||
function onIsPlayingChanged() {
|
||||
handleUpdate();
|
||||
@@ -168,14 +171,14 @@ DankOSD {
|
||||
Item {
|
||||
id: bgContainer
|
||||
anchors.fill: parent
|
||||
visible: TrackArtService._bgArtSource !== ""
|
||||
visible: TrackArtService.resolvedArtUrl !== ""
|
||||
|
||||
Image {
|
||||
id: bgImage
|
||||
anchors.centerIn: parent
|
||||
width: Math.max(parent.width, parent.height)
|
||||
height: width
|
||||
source: TrackArtService._bgArtSource
|
||||
source: TrackArtService.resolvedArtUrl
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: true
|
||||
|
||||
Reference in New Issue
Block a user