gui: Port to Blueprint
This was mostly done with `blueprint-compiler port`. Since Blueprint doesn't know about custom templates, I had to manually change some values from strings to literals. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/567>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $GcalCalendarNavigationButton: Adw.Bin {
|
||||
child: Stack stack {
|
||||
hhomogeneous: false;
|
||||
|
||||
StackPage {
|
||||
name: "active";
|
||||
|
||||
child: MenuButton button {
|
||||
popover: popover_date_chooser;
|
||||
label: _("_Choose Date");
|
||||
use-underline: true;
|
||||
can-shrink: true;
|
||||
tooltip-text: _("Choose a Date");
|
||||
always-show-arrow: true;
|
||||
};
|
||||
}
|
||||
|
||||
StackPage {
|
||||
name: "inactive";
|
||||
|
||||
child: Label static_label {
|
||||
styles [
|
||||
"heading",
|
||||
]
|
||||
|
||||
label: bind button.label no-sync-create;
|
||||
margin-start: 9;
|
||||
margin-end: 9;
|
||||
};
|
||||
}
|
||||
|
||||
visible-child-name: "active";
|
||||
};
|
||||
}
|
||||
|
||||
Popover popover_date_chooser {
|
||||
position: bottom;
|
||||
|
||||
child: $GcalDateChooser {
|
||||
split-month-year: true;
|
||||
vexpand: false;
|
||||
valign: end;
|
||||
active-date: bind template.active-date no-sync-create bidirectional;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user