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,47 @@
|
||||
using Gtk 4.0;
|
||||
|
||||
template $GcalWeatherSettings: Box {
|
||||
orientation: vertical;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
spacing: 6;
|
||||
|
||||
Box {
|
||||
spacing: 18;
|
||||
|
||||
Label {
|
||||
hexpand: true;
|
||||
xalign: 0.0;
|
||||
label: _("Show Weather");
|
||||
}
|
||||
|
||||
Switch show_weather_switch {
|
||||
notify::active => $on_show_weather_changed_cb(template) not-swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Box weather_auto_location_box {
|
||||
spacing: 18;
|
||||
|
||||
Label {
|
||||
hexpand: true;
|
||||
xalign: 0.0;
|
||||
label: _("Automatic Location");
|
||||
}
|
||||
|
||||
Switch weather_auto_location_switch {
|
||||
notify::active => $on_weather_auto_location_changed_cb(template) not-swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Entry weather_location_entry {
|
||||
placeholder-text: _("Search locations");
|
||||
primary-icon-name: "edit-find-symbolic";
|
||||
primary-icon-activatable: false;
|
||||
primary-icon-sensitive: false;
|
||||
changed => $on_weather_location_searchbox_changed_cb(template) not-swapped;
|
||||
activate => $on_weather_location_searchbox_changed_cb(template) not-swapped;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user