fix some warnings

This commit is contained in:
Erica Z 2024-10-20 17:46:59 +02:00
parent 41bfab9ab8
commit 48795a4d2f
2 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,7 @@
// song widget+drag behavior taken from gnome music
[GtkTemplate (ui = "/eu/callcc/audrey/ui/play_queue_song.ui")]
class Ui.PlayQueueSong : Gtk.ListBoxRow {
class Ui.PlayQueueSong : Gtk.Box {
public bool draggable { get; set; default = false; }
public bool show_position { get; set; default = false; }
public bool show_artist { get; set; default = false; }
@ -75,6 +75,7 @@ class Ui.PlayQueueSong : Gtk.ListBoxRow {
private Gtk.ListBox? drag_widget;
[GtkCallback] private void on_drag_begin (Gtk.DragSource source, Gdk.Drag drag) {
/* FIXME
this.drag_widget = new Gtk.ListBox ();
this.drag_widget.set_size_request (this.get_width (), this.get_height ());
@ -92,7 +93,7 @@ class Ui.PlayQueueSong : Gtk.ListBoxRow {
var drag_icon = Gtk.DragIcon.get_for_drag (drag);
drag_icon.set("child", this.drag_widget);
drag.set_hotspot ((int) this.drag_x, (int) this.drag_y);
drag.set_hotspot ((int) this.drag_x, (int) this.drag_y); */
}
[GtkCallback] private bool on_drop (Value value, double x, double y) {

View file

@ -1,9 +1,6 @@
using Gtk 4.0;
template $UiPlayQueueSong: ListBoxRow {
selectable: false;
activatable: false; // prevents double background change on focus
template $UiPlayQueueSong: Box {
Box {
focusable: false;
spacing: 6;