summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Hasselmann <hasselmm@src.gnome.org>2007-12-28 09:36:57 +0000
committerMathias Hasselmann <hasselmm@src.gnome.org>2007-12-28 09:36:57 +0000
commit6fda2b46a7dbe1c986b023be04ef064933e34fae (patch)
tree22b8f77f036e9762280f5d9ceb827566f67b0571
parent2372a2cdd1894df3423e7ceb83fded6bb679a512 (diff)
downloadgtk+-6fda2b46a7dbe1c986b023be04ef064933e34fae.tar.gz
Try more decent appearance of calendar details separator. (#339540)
* gtk/gtkcalendar.c: Use different colors for drawing the separator, and make it short by one pixel on each side. svn path=/trunk/; revision=19266
-rw-r--r--ChangeLog7
-rw-r--r--gtk/gtkcalendar.c15
2 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ab7db389ba..e41f1e34ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-12-28 Mathias Hasselmann <mathias@openismus.com>
+ Try more decent appearance of calendar details separator. (#339540)
+
+ * gtk/gtkcalendar.c: Use different colors for drawing the separator,
+ and make it short by one pixel on each side.
+
+2007-12-28 Mathias Hasselmann <mathias@openismus.com>
+
Apply trivial code-style changes from attachement 101101. (#339540)
* tests/testcalendar.c: Some updates to current GTK+ code-style.
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 59452bbabd..29d2a7b49d 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2473,11 +2473,22 @@ calendar_paint_day (GtkCalendar *calendar,
if (priv->detail_func)
{
+ cairo_save (cr);
+
+ if (calendar->selected_day == day)
+ gdk_cairo_set_source_color (cr, &widget->style->text[GTK_STATE_ACTIVE]);
+ else if (calendar->day_month[row][col] == MONTH_CURRENT)
+ gdk_cairo_set_source_color (cr, &widget->style->base[GTK_STATE_ACTIVE]);
+ else
+ gdk_cairo_set_source_color (cr, &widget->style->base[GTK_STATE_INSENSITIVE]);
+
cairo_set_line_width (cr, 1);
- cairo_move_to (cr, day_rect.x + 1, y_loc + 0.5);
- cairo_line_to (cr, day_rect.x + day_rect.width - 1, y_loc + 0.5);
+ cairo_move_to (cr, day_rect.x + 2, y_loc + 0.5);
+ cairo_line_to (cr, day_rect.x + day_rect.width - 2, y_loc + 0.5);
cairo_stroke (cr);
+ cairo_restore (cr);
+
y_loc += 2;
}