fix(slint/discover): open playlist on body-click in Search and Label
The new ("playlist","play") media-action arm gave these cards a body-click
action for the first time. Without body-opens they defaulted to play, so a
playlist card body-click played instead of opening (and before the arm
existed, did nothing at all). Set body-opens:true on the Search carousel,
Search grid, and Label carousel so body-click opens the playlist while the
overlay button plays — matching the album-card convention and Tauri.
cc
This commit is contained in:
2 files changed
+3
No files matched your search
@@ -370,6 +370,7 @@ export component LabelPageView inherits Rectangle {
|
|||||||
if LabelState.playlists.length > 0: PlaylistCarousel {
|
if LabelState.playlists.length > 0: PlaylistCarousel {
|
||||||
title: @tr("Playlists");
|
title: @tr("Playlists");
|
||||||
playlists: LabelState.playlists;
|
playlists: LabelState.playlists;
|
||||||
|
body-opens: true; // body click opens the playlist; the overlay button plays
|
||||||
media-action(kind, id, action) => {
|
media-action(kind, id, action) => {
|
||||||
root.media-action(kind, id, action);
|
root.media-action(kind, id, action);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ component PlaylistGrid inherits Rectangle {
|
|||||||
x: Math.mod(i, root.columns) * (root.card-w + root.gap);
|
x: Math.mod(i, root.columns) * (root.card-w + root.gap);
|
||||||
y: Math.floor(i / root.columns) * (root.card-h + root.gap);
|
y: Math.floor(i / root.columns) * (root.card-h + root.gap);
|
||||||
playlist: playlist;
|
playlist: playlist;
|
||||||
|
body-opens: true; // body click opens the playlist; the overlay button plays
|
||||||
media-action(k, ii, a) => {
|
media-action(k, ii, a) => {
|
||||||
root.media-action(k, ii, a);
|
root.media-action(k, ii, a);
|
||||||
}
|
}
|
||||||
@@ -601,6 +602,7 @@ export component SearchResultsView inherits Rectangle {
|
|||||||
if SearchState.tab == 0 && SearchState.playlists.length > 0: PlaylistCarousel {
|
if SearchState.tab == 0 && SearchState.playlists.length > 0: PlaylistCarousel {
|
||||||
title: @tr("Playlists");
|
title: @tr("Playlists");
|
||||||
playlists: SearchState.playlists;
|
playlists: SearchState.playlists;
|
||||||
|
body-opens: true; // body click opens the playlist; the overlay button plays
|
||||||
show-view-all: true;
|
show-view-all: true;
|
||||||
media-action(k, i, a) => { root.media-action(k, i, a); }
|
media-action(k, i, a) => { root.media-action(k, i, a); }
|
||||||
view-all-clicked => { SearchActions.tab-changed(4); }
|
view-all-clicked => { SearchActions.tab-changed(4); }
|
||||||
|
|||||||
Reference in new issue
Block a user