From 534fb3a83c0707df20c9ae2ab901811d84d5a63f Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Mon, 18 Aug 2025 14:55:49 -0400 Subject: [PATCH] gui: Update to libadwaita's custom properties and style classes Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1440 Part-of: --- src/gui/gcal-calendar-list.c | 5 +++-- src/gui/views/gcal-month-view.blp | 30 ++---------------------------- src/theme/style.css | 5 +---- 3 files changed, 6 insertions(+), 34 deletions(-) diff --git a/src/gui/gcal-calendar-list.c b/src/gui/gcal-calendar-list.c index 4886e74d..1cda3fc7 100644 --- a/src/gui/gcal-calendar-list.c +++ b/src/gui/gcal-calendar-list.c @@ -182,7 +182,7 @@ update_header_func (GtkListBoxRow *row, { header = g_object_new (GTK_TYPE_LABEL, "label", e_source_get_display_name (parent), - "css-classes", (const gchar * const []) { "header", NULL }, + "css-classes", (const gchar * const []) { "heading", "dimmed", NULL }, "xalign", 0.0, "margin-top", 18, "margin-bottom", 6, @@ -195,7 +195,7 @@ update_header_func (GtkListBoxRow *row, { header = g_object_new (GTK_TYPE_LABEL, "label", e_source_get_display_name (parent), - "css-classes", (const gchar * const []) { "header", NULL }, + "css-classes", (const gchar * const []) { "heading", "dimmed", NULL }, "xalign", 0.0, "margin-top", 18, "margin-bottom", 6, @@ -311,3 +311,4 @@ gcal_calendar_list_init (GcalCalendarList *self) { gtk_widget_init_template (GTK_WIDGET (self)); } + diff --git a/src/gui/views/gcal-month-view.blp b/src/gui/views/gcal-month-view.blp index 55033566..fa61b0d5 100644 --- a/src/gui/views/gcal-month-view.blp +++ b/src/gui/views/gcal-month-view.blp @@ -34,6 +34,8 @@ template $GcalMonthView: Widget { [header] Box { styles [ + "header", + "heading", "month-header", "view", ] @@ -44,70 +46,42 @@ template $GcalMonthView: Widget { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_1 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_2 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_3 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_4 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_5 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } Label label_6 { margin-start: 6; hexpand: true; xalign: 0.0; - - styles [ - "header", - ] } } } diff --git a/src/theme/style.css b/src/theme/style.css index ae189b32..2a972fd2 100644 --- a/src/theme/style.css +++ b/src/theme/style.css @@ -15,10 +15,7 @@ calendar-view { font-size: 10pt; } -calendar-view.header, -label.header { - font-size: 10pt; - font-weight: bold; +calendar-view box.header label { opacity: var(--dim-opacity); }