[gnome-calendar] Improving Searchbar looking. Fixes to GcalWeekView
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] Improving Searchbar looking. Fixes to GcalWeekView
- Date: Sat, 22 Sep 2012 15:15:28 +0000 (UTC)
commit 4ef16c7f1a4cd3749b8f29ed2cffbee0bb6f838b
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Mon Sep 10 10:48:48 2012 -0400
Improving Searchbar looking. Fixes to GcalWeekView
data/theme/gtk-styles.css | 2 +-
src/gcal-week-view.c | 26 ++++++++++++--------------
src/gcal-window.c | 3 +++
3 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css
index 847c07a..9403407 100644
--- a/data/theme/gtk-styles.css
+++ b/data/theme/gtk-styles.css
@@ -28,7 +28,7 @@ GtkClutterOffscreen.contents .frame {
padding: 12px;
}
-.main-toolbar .button {
+.main-toolbar .button, .toolbar-button {
padding: 2px;
}
diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c
index 3d4c2f1..4887ea1 100644
--- a/src/gcal-week-view.c
+++ b/src/gcal-week-view.c
@@ -360,12 +360,7 @@ gcal_week_view_realize (GtkWidget *widget)
attributes.y = allocation.y;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_BUTTON1_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK);
+ GDK_BUTTON_RELEASE_MASK);
attributes_mask = GDK_WA_X | GDK_WA_Y;
priv->event_window = gdk_window_new (parent_window,
@@ -630,14 +625,16 @@ gcal_week_view_draw (GtkWidget *widget,
gtk_style_context_get_padding (context, state, &padding);
gtk_widget_get_allocation (widget, &alloc);
- /* setting the same line width for both windows */
- cairo_set_line_width (cr, 0.3);
-
- gcal_week_view_draw_header (GCAL_WEEK_VIEW (widget),
- cr,
- &alloc,
- &padding);
-
+ if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
+ {
+ cairo_save (cr);
+ cairo_set_line_width (cr, 0.3);
+ gcal_week_view_draw_header (GCAL_WEEK_VIEW (widget),
+ cr,
+ &alloc,
+ &padding);
+ cairo_restore (cr);
+ }
if (priv->view_window != NULL &&
gtk_cairo_should_draw_window (cr, priv->view_window))
@@ -657,6 +654,7 @@ gcal_week_view_draw (GtkWidget *widget,
gtk_cairo_should_draw_window (cr, priv->grid_window))
{
cairo_save (cr);
+ cairo_set_line_width (cr, 0.3);
gcal_week_view_draw_grid_window (GCAL_WEEK_VIEW (widget), cr);
cairo_restore (cr);
}
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 8460e5a..601f0cb 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -279,6 +279,9 @@ gcal_window_constructed (GObject *object)
gtk_style_context_add_class (
gtk_widget_get_style_context (button),
"suggested-action");
+ gtk_style_context_add_class (
+ gtk_widget_get_style_context (button),
+ "toolbar-button");
entry = gtk_search_entry_new ();
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), _("Search ..."));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]