event-editor/schedule-section: Use separate-rows property in all-day section
`separate-rows` already does what we want, and using that property allows us to nesting AdwPreferencesGroup into a GtkBox widget. Co-authored-by: Jamie Gravendeel <me@jamie.garden> Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/781>
This commit is contained in:
co-authored by
Jamie Gravendeel
parent
8bbaeb754b
commit
4f037132fe
@@ -18,22 +18,17 @@ template $GcalScheduleSection: Box {
|
||||
name: "all-day";
|
||||
use-underline: true;
|
||||
|
||||
child: Box {
|
||||
orientation: vertical;
|
||||
spacing: 12;
|
||||
child: Adw.PreferencesGroup {
|
||||
separate-rows: true;
|
||||
|
||||
Adw.PreferencesGroup start_date_group {
|
||||
$GcalDateChooserRow start_date_row {
|
||||
title: _("Start Date");
|
||||
notify::date => $on_start_date_changed_cb(template) not-swapped;
|
||||
}
|
||||
$GcalDateChooserRow start_date_row {
|
||||
title: _("Start Date");
|
||||
notify::date => $on_start_date_changed_cb(template) not-swapped;
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup end_date_group {
|
||||
$GcalDateChooserRow end_date_row {
|
||||
title: _("End Date");
|
||||
notify::date => $on_end_date_changed_cb(template) not-swapped;
|
||||
}
|
||||
$GcalDateChooserRow end_date_row {
|
||||
title: _("End Date");
|
||||
notify::date => $on_end_date_changed_cb(template) not-swapped;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,9 +41,7 @@ struct _GcalScheduleSection
|
||||
GcalEventSchedule *values;
|
||||
|
||||
AdwViewStack *schedule_type_stack;
|
||||
AdwPreferencesGroup *start_date_group;
|
||||
GcalDateChooserRow *start_date_row;
|
||||
AdwPreferencesGroup *end_date_group;
|
||||
GcalDateChooserRow *end_date_row;
|
||||
GcalDateTimeChooser *start_date_time_chooser;
|
||||
GcalDateTimeChooser *end_date_time_chooser;
|
||||
@@ -656,9 +654,7 @@ gcal_schedule_section_class_init (GcalScheduleSectionClass *klass)
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/event-editor/gcal-schedule-section.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, schedule_type_stack);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, start_date_group);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, start_date_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, end_date_group);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, end_date_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, start_date_time_chooser);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalScheduleSection, end_date_time_chooser);
|
||||
|
||||
Reference in New Issue
Block a user