month-view: remove month and year header
This header duplicates the month and year from the new navigation button in the header. Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it> Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542>
This commit is contained in:
committed by
Marge Bot
parent
f06bc265cd
commit
1de447f7f3
@@ -50,8 +50,6 @@ struct _GcalMonthView
|
||||
GtkWidget parent;
|
||||
|
||||
GtkWidget *header;
|
||||
GtkWidget *month_label;
|
||||
GtkWidget *year_label;
|
||||
GtkWidget *weekday_label[7];
|
||||
|
||||
GtkEventController *motion_controller;
|
||||
@@ -227,9 +225,6 @@ update_header_labels (GcalMonthView *self)
|
||||
g_date_time_get_year (first_visible_date),
|
||||
g_date_time_get_year (last_visible_date));
|
||||
}
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (self->month_label), month_string);
|
||||
gtk_label_set_label (GTK_LABEL (self->year_label), year_string);
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -1652,9 +1647,7 @@ gcal_month_view_class_init (GcalMonthViewClass *klass)
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-month-view.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalMonthView, month_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalMonthView, motion_controller);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalMonthView, year_label);
|
||||
|
||||
gtk_widget_class_bind_template_child_full (widget_class, "label_0", FALSE, G_STRUCT_OFFSET (GcalMonthView, weekday_label[0]));
|
||||
gtk_widget_class_bind_template_child_full (widget_class, "label_1", FALSE, G_STRUCT_OFFSET (GcalMonthView, weekday_label[1]));
|
||||
|
||||
@@ -38,113 +38,87 @@
|
||||
<!-- Header -->
|
||||
<child type="header">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<style>
|
||||
<class name="month-header" />
|
||||
<class name="view" />
|
||||
</style>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="month_label">
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="month-name" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="year_label">
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">1.0</property>
|
||||
<style>
|
||||
<class name="secondary-label" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkLabel" id="label_0">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_0">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_1">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_2">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_3">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_4">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_5">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_6">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkLabel" id="label_1">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_2">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_3">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_4">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_5">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_6">
|
||||
<property name="margin-start">6</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<style>
|
||||
<class name="header" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user