using Gtk 4.0; template $UiPlayQueueSong: Box { Box { width-request: 24; focusable: false; homogeneous: true; Image { visible: bind template.current; focusable: false; halign: end; icon-size: normal; icon-name: "media-playback-start"; } Label { visible: bind template.current inverted; focusable: false; halign: end; justify: right; styles [ "dim-label", "numeric" ] label: bind template.displayed_position; } } Box title_box { styles [ "header"] focusable: false; hexpand: true; Box { styles [ "title" ] orientation: vertical; Label { styles [ "title" ] focusable: false; xalign: 0; halign: start; hexpand: true; ellipsize: end; max-width-chars: 90; justify: fill; margin-start: 9; label: bind template.song as <$SubsonicSong>.title; } Label { styles [ "subtitle" ] focusable: false; xalign: 0; halign: start; hexpand: true; ellipsize: end; max-width-chars: 90; justify: fill; margin-start: 9; label: bind template.song as <$SubsonicSong>.artist; } } } Label { focusable: false; halign: end; hexpand: true; single-line-mode: true; styles [ "numeric", "dim-label" ] label: bind $format_duration (template.song as <$SubsonicSong>.duration) as ; } Button { focusable: true; icon-name: bind $star_button_icon_name (template.song as <$SubsonicSong>.starred) as ; styles [ "flat" ] } MenuButton { //visible: false; focusable: true; icon-name: "view-more"; styles [ "flat" ] popover: PopoverMenu { menu-model: song-menu; }; } DragSource { actions: move; propagation-phase: capture; prepare => $on_drag_prepare (); drag-begin => $on_drag_begin (); } DropTarget { actions: move; formats: "UiPlayQueueSong"; preload: true; drop => $on_drop (); } } menu song-menu { item ("View song", "song.view") item ("View artist", "song.view-artist") item ("View album", "song.view-album") item ("Share", "song.share") item ("Remove", "song.remove") }