Add custom search bar with tags

This commit is contained in:
Elias Projahn 2023-09-30 00:22:33 +02:00
parent 00bd7027a6
commit 08be3cb613
9 changed files with 283 additions and 16 deletions

31
data/ui/search_entry.blp Normal file
View file

@ -0,0 +1,31 @@
using Gtk 4.0;
using Adw 1;
template $MusicusSearchEntry : Gtk.Box {
styles ["searchbar"]
margin-start: 12;
margin-end: 12;
margin-top: 6;
margin-bottom: 6;
Gtk.Image {
icon-name: "system-search-symbolic";
}
Gtk.Box tags_box {
valign: center;
}
Gtk.Text text {
placeholder-text: _("Enter composers, performers, works…");
hexpand: true;
activate => $activate() swapped;
backspace => $backspace() swapped;
}
Gtk.Image clear_icon {
icon-name: "edit-clear-symbolic";
tooltip-text: _("Clear entry");
}
}