[gnome-calendar] A bunch of UI fixes.
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] A bunch of UI fixes.
- Date: Thu, 19 Jul 2012 12:05:47 +0000 (UTC)
commit f33feaf6b1bf24f44d4b4f179942c176a4b01d9f
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Thu Jul 19 01:26:45 2012 -0400
A bunch of UI fixes.
Made lighter the background of the views.
Added padding and fixed class to GcalToolbar.
data/gtk-styles.css | 12 +++++++++++-
src/gcal-month-view.c | 2 ++
src/gcal-toolbar.c | 2 +-
src/gcal-week-view.c | 9 +++------
4 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/data/gtk-styles.css b/data/gtk-styles.css
index d165a8b..9441882 100644
--- a/data/gtk-styles.css
+++ b/data/gtk-styles.css
@@ -19,6 +19,15 @@
margin: 0;
}
+.main-toolbar {
+ padding-top: 12px;
+ padding-bottom: 12px;
+}
+
+.main-toolbar .button {
+ padding: 2px;
+}
+
.sources-views {
padding: 12px;
border-radius: 0;
@@ -40,10 +49,11 @@
.calendar-view header {
font: bold 12;
- background-color: @theme_bg_color;
}
.calendar-view {
+ background-color: #F6F6F6;
+
padding: 6px;
font: 10;
}
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 0fda484..f66d2cd 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -454,6 +454,8 @@ gcal_month_view_draw (GtkWidget *widget,
gtk_style_context_get_padding (context, state, &padding);
gtk_widget_get_allocation (widget, &alloc);
+ gtk_render_background (context, cr, alloc.x, alloc.y, alloc.width, alloc.height);
+
gcal_month_view_draw_header (GCAL_MONTH_VIEW (widget), cr, &alloc, &padding);
gcal_month_view_draw_grid (GCAL_MONTH_VIEW (widget), cr, &alloc, &padding);
diff --git a/src/gcal-toolbar.c b/src/gcal-toolbar.c
index b26fae0..71a503c 100644
--- a/src/gcal-toolbar.c
+++ b/src/gcal-toolbar.c
@@ -183,7 +183,7 @@ gcal_toolbar_constructed (GObject *object)
GTK_ICON_SIZE_BUTTON);
context = gtk_widget_get_style_context (priv->widget);
- gtk_style_context_add_class (context, "gcal-main-toolbar");
+ gtk_style_context_add_class (context, "main-toolbar");
/* adding toolbar */
bin = gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (object));
diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c
index 75d9f94..fb87e46 100644
--- a/src/gcal-week-view.c
+++ b/src/gcal-week-view.c
@@ -876,12 +876,6 @@ gcal_week_view_draw_header (GcalWeekView *view,
context = gtk_widget_get_style_context (widget);
state = gtk_widget_get_state_flags (widget);
- gtk_style_context_save (context);
- gtk_style_context_add_region (context, "header", 0);
-
- gtk_render_background (context, cr,
- alloc->x, alloc->y,
- alloc->width, start_grid_y);
/* adding shadow */
pattern = cairo_pattern_create_linear(0, start_grid_y - 18, 0, start_grid_y + 6);
@@ -894,6 +888,9 @@ gcal_week_view_draw_header (GcalWeekView *view,
cairo_rectangle(cr, 0, start_grid_y, alloc->width, 6);
cairo_fill(cr);
+ gtk_style_context_save (context);
+ gtk_style_context_add_region (context, "header", 0);
+
gtk_style_context_get_color (context, state, &color);
cairo_set_source_rgb (cr, color.red, color.green, color.blue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]