mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Add custom search bar with tags
This commit is contained in:
parent
00bd7027a6
commit
08be3cb613
9 changed files with 283 additions and 16 deletions
31
data/ui/search_entry.blp
Normal file
31
data/ui/search_entry.blp
Normal 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");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue