Improving Searchbar looking. Fixes to GcalWeekView

This commit is contained in:
Erick Pérez Castellanos
2012-09-10 10:48:48 -04:00
parent 65c8f83e81
commit 4ef16c7f1a
3 changed files with 16 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ GtkClutterOffscreen.contents .frame {
padding: 12px; padding: 12px;
} }
.main-toolbar .button { .main-toolbar .button, .toolbar-button {
padding: 2px; padding: 2px;
} }
+12 -14
View File
@@ -360,12 +360,7 @@ gcal_week_view_realize (GtkWidget *widget)
attributes.y = allocation.y; attributes.y = allocation.y;
attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK | attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_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);
attributes_mask = GDK_WA_X | GDK_WA_Y; attributes_mask = GDK_WA_X | GDK_WA_Y;
priv->event_window = gdk_window_new (parent_window, 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_style_context_get_padding (context, state, &padding);
gtk_widget_get_allocation (widget, &alloc); gtk_widget_get_allocation (widget, &alloc);
/* setting the same line width for both windows */ if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
cairo_set_line_width (cr, 0.3); {
cairo_save (cr);
gcal_week_view_draw_header (GCAL_WEEK_VIEW (widget), cairo_set_line_width (cr, 0.3);
cr, gcal_week_view_draw_header (GCAL_WEEK_VIEW (widget),
&alloc, cr,
&padding); &alloc,
&padding);
cairo_restore (cr);
}
if (priv->view_window != NULL && if (priv->view_window != NULL &&
gtk_cairo_should_draw_window (cr, priv->view_window)) 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)) gtk_cairo_should_draw_window (cr, priv->grid_window))
{ {
cairo_save (cr); cairo_save (cr);
cairo_set_line_width (cr, 0.3);
gcal_week_view_draw_grid_window (GCAL_WEEK_VIEW (widget), cr); gcal_week_view_draw_grid_window (GCAL_WEEK_VIEW (widget), cr);
cairo_restore (cr); cairo_restore (cr);
} }
+3
View File
@@ -279,6 +279,9 @@ gcal_window_constructed (GObject *object)
gtk_style_context_add_class ( gtk_style_context_add_class (
gtk_widget_get_style_context (button), gtk_widget_get_style_context (button),
"suggested-action"); "suggested-action");
gtk_style_context_add_class (
gtk_widget_get_style_context (button),
"toolbar-button");
entry = gtk_search_entry_new (); entry = gtk_search_entry_new ();
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), _("Search ...")); gtk_entry_set_placeholder_text (GTK_ENTRY (entry), _("Search ..."));