Skip to content

Commit

Permalink
MainWindow: use Adw.ToolbarView (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored May 14, 2024
1 parent 8a09fc6 commit 07d7485
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ config_file = configure_file(
configuration: config_data
)

adw_dep = dependency('libadwaita-1', version: '>=1.4.0')
granite_dep = dependency('granite-7')
gstreamer_dep = dependency('gstreamer-1.0')
gstreamer_pbutils_dep = dependency('gstreamer-pbutils-1.0')
gstreamer_tag_dep = dependency('gstreamer-tag-1.0')
gtk_dep = dependency('gtk4')

dependencies = [
adw_dep,
granite_dep,
gstreamer_dep,
gstreamer_pbutils_dep,
Expand Down
10 changes: 5 additions & 5 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
show_title_buttons = false,
title_widget = new Gtk.Label ("")
};
queue_header.add_css_class (Granite.STYLE_CLASS_FLAT);
queue_header.add_css_class (Granite.STYLE_CLASS_DEFAULT_DECORATION);
queue_header.pack_start (start_window_controls);
queue_header.pack_end (shuffle_button);
Expand All @@ -48,11 +47,12 @@ public class Music.MainWindow : Gtk.ApplicationWindow {

var drop_target = new Gtk.DropTarget (typeof (Gdk.FileList), Gdk.DragAction.COPY);

var queue = new Gtk.Grid ();
queue.add_css_class (Granite.STYLE_CLASS_VIEW);
queue.attach (queue_header, 0, 0);
queue.attach (scrolled, 0, 1);
var queue = new Adw.ToolbarView () {
content = scrolled
};
queue.add_controller (drop_target);
queue.add_css_class (Granite.STYLE_CLASS_VIEW);
queue.add_top_bar (queue_header);

var error_toast = new Granite.Toast ("");

Expand Down

0 comments on commit 07d7485

Please sign in to comment.