From 27ca660e772bd42908ff33002efc9f252e194f66 Mon Sep 17 00:00:00 2001 From: nj4710 Date: Wed, 10 Aug 2016 00:09:32 +0530 Subject: [PATCH] month-view: highlight the whole cell of current day In this commit, we changed the background area of current day. Presently, the current day is highlighted by the number. This makes difficult for the user to identify it when there are lot of events. To fix this, we changed the color of background and made background area equal to the cell's area. https://bugzilla.gnome.org/show_bug.cgi?id=755946 --- data/theme/gtk-styles.css | 5 +---- src/gcal-month-view.c | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css index 8ca9ce30..7fc5f111 100644 --- a/data/theme/gtk-styles.css +++ b/data/theme/gtk-styles.css @@ -29,10 +29,7 @@ calendar-view.header { } calendar-view.current { - background-color: black; - border-radius: 2px; - color: white; - font-weight: bold; + background-color: alpha(@theme_selected_bg_color, 0.3); } calendar-view.current:drop(active) { diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 64b43365..9896802b 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -1789,9 +1789,9 @@ gcal_month_view_draw (GtkWidget *widget, /* FIXME: hardcoded padding of the number background */ gtk_render_background (context, cr, - cell_width * (column + 1 - priv->k) - sw * padding.right + (priv->k - 1) * font_width - 2.0, - cell_height * (row + 1 + first_row_gap) - font_height - padding.bottom + start_grid_y, - font_width + 4, font_height + 2); + cell_width * (column - priv->k), + cell_height * (row + first_row_gap) + start_grid_y, + cell_width, cell_height); gtk_render_layout (context, cr, cell_width * (column + 1 - priv->k) - sw * padding.right + (priv->k - 1) * font_width, cell_height * (row + 1 + first_row_gap) - font_height - padding.bottom + start_grid_y,