From e3d29c989e29c555d15f142e015b16ae35945a17 Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Tue, 26 Jul 2016 18:58:52 +0200 Subject: [PATCH] date-selector: change style class on other month days use .other-month in place of .dim-label since the .dim-label style was not fitting, so better to use a specific class then a generic one. --- data/theme/gtk-styles.css | 14 +++++--------- src/gcal-date-chooser-day.c | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css index 891d0678..8ca9ce30 100644 --- a/data/theme/gtk-styles.css +++ b/data/theme/gtk-styles.css @@ -328,19 +328,15 @@ datechooser day { border-radius: 50%; } -datechooser day.dim-label { /* FIXME: use a better class name */ - opacity: 1; -} - -datechooser day.dim-label:not(:hover), -datechooser day.dim-label:backdrop { +datechooser day.other-month:not(:hover), +datechooser day.other-month:backdrop { color: alpha(currentColor, 0.1); } /* avoid the theme interfering with label colors */ datechooser day:selected label, -datechooser day.dim-label label:hover, -datechooser day.dim-label label:backdrop { +datechooser day.other-month label:hover, +datechooser day.other-month label:backdrop { color: currentColor; } @@ -349,7 +345,7 @@ datechooser day:hover:not(:backdrop) { background-color: alpha(currentColor, 0.1); } -datechooser day.dim-label:hover:not(:backdrop) { +datechooser day.other-month:hover:not(:backdrop) { color: @insensitive_fg_color; } diff --git a/src/gcal-date-chooser-day.c b/src/gcal-date-chooser-day.c index 38595d09..dc8671be 100644 --- a/src/gcal-date-chooser-day.c +++ b/src/gcal-date-chooser-day.c @@ -431,12 +431,12 @@ gcal_date_chooser_day_set_other_month (GcalDateChooserDay *self, if (other_month) { - gtk_style_context_add_class (context, GTK_STYLE_CLASS_DIM_LABEL); + gtk_style_context_add_class (context, "other-month"); gtk_drag_source_unset (GTK_WIDGET (self)); } else { - gtk_style_context_remove_class (context, GTK_STYLE_CLASS_DIM_LABEL); + gtk_style_context_remove_class (context, "other-month"); gtk_drag_source_set (GTK_WIDGET (self), GDK_BUTTON1_MASK | GDK_BUTTON3_MASK, NULL, 0,