Files
federated-calendar/src/gui/calendar-management/gcal-calendars-page.blp
T
Jamie Gravendeel a509de8b1e 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>
2025-06-08 14:31:01 +02:00

75 lines
1.6 KiB
Plaintext

using Gtk 4.0;
using Adw 1;
template $GcalCalendarsPage: Adw.NavigationPage {
title: _("Calendars");
tag: "calendars";
child: Adw.ToastOverlay toast_overlay {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
content: ScrolledWindow {
hexpand: true;
hscrollbar-policy: never;
max-content-height: 900;
propagate-natural-height: true;
child: Adw.Clamp {
child: Box {
orientation: vertical;
spacing: 24;
margin-top: 24;
margin-bottom: 24;
margin-start: 12;
margin-end: 12;
valign: start;
ListBox listbox {
selection-mode: none;
row-activated => $on_listbox_row_activated_cb(template) not-swapped;
styles [
"calendars-list",
"boxed-list",
]
}
};
};
};
[bottom]
Adw.Clamp {
ListBox {
selection-mode: none;
margin-top: 15;
margin-bottom: 15;
margin-start: 12;
margin-end: 12;
Adw.ButtonRow {
title: _("_Add Calendar");
use-underline: true;
end-icon-name: "go-next-symbolic";
activated => $on_new_calendar_row_activated_cb(template) not-swapped;
ShortcutController {
scope: managed;
Shortcut {
trigger: "<Ctrl>n";
action: "activate";
}
}
}
styles [
"boxed-list",
]
}
}
}
};
}