diff --git a/src/gui/event-editor/gcal-event-editor-dialog.blp b/src/gui/event-editor/gcal-event-editor-dialog.blp index 7d1b6274..23a86a1d 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.blp +++ b/src/gui/event-editor/gcal-event-editor-dialog.blp @@ -49,10 +49,8 @@ template $GcalEventEditorDialog: Adw.Dialog { } } - Adw.PreferencesGroup { - $GcalScheduleSection schedule_section { - sensitive: bind template.writable; - } + $GcalScheduleSection schedule_section { + sensitive: bind template.writable; } $GcalAttendeesSection attendees_section { diff --git a/src/gui/event-editor/gcal-schedule-section.blp b/src/gui/event-editor/gcal-schedule-section.blp index 3e22175a..dd67c94a 100644 --- a/src/gui/event-editor/gcal-schedule-section.blp +++ b/src/gui/event-editor/gcal-schedule-section.blp @@ -1,16 +1,14 @@ using Gtk 4.0; using Adw 1; -template $GcalScheduleSection: Box { - orientation: vertical; - spacing: 12; - +template $GcalScheduleSection: Adw.PreferencesGroup { Adw.InlineViewSwitcher { stack: schedule_type_stack; homogeneous: true; } Adw.ViewStack schedule_type_stack { + margin-top: 12; vhomogeneous: false; Adw.ViewStackPage { diff --git a/src/gui/event-editor/gcal-schedule-section.c b/src/gui/event-editor/gcal-schedule-section.c index 861557d2..dca6f73d 100644 --- a/src/gui/event-editor/gcal-schedule-section.c +++ b/src/gui/event-editor/gcal-schedule-section.c @@ -92,7 +92,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetState, widget_state_free); static void gcal_event_editor_section_iface_init (GcalEventEditorSectionInterface *iface); -G_DEFINE_TYPE_WITH_CODE (GcalScheduleSection, gcal_schedule_section, GTK_TYPE_BOX, +G_DEFINE_TYPE_WITH_CODE (GcalScheduleSection, gcal_schedule_section, ADW_TYPE_PREFERENCES_GROUP, G_IMPLEMENT_INTERFACE (GCAL_TYPE_EVENT_EDITOR_SECTION, gcal_event_editor_section_iface_init)) static void on_start_date_changed_cb (GtkWidget *widget, diff --git a/src/gui/event-editor/gcal-schedule-section.h b/src/gui/event-editor/gcal-schedule-section.h index e17f0be5..427fd8d8 100644 --- a/src/gui/event-editor/gcal-schedule-section.h +++ b/src/gui/event-editor/gcal-schedule-section.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS #define GCAL_TYPE_SCHEDULE_SECTION (gcal_schedule_section_get_type()) -G_DECLARE_FINAL_TYPE (GcalScheduleSection, gcal_schedule_section, GCAL, SCHEDULE_SECTION, GtkBox) +G_DECLARE_FINAL_TYPE (GcalScheduleSection, gcal_schedule_section, GCAL, SCHEDULE_SECTION, AdwPreferencesGroup) gboolean gcal_schedule_section_recurrence_changed (GcalScheduleSection *self);