[gnome-calendar] event-widget: hardcode padding-top/bottom at 4px
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] event-widget: hardcode padding-top/bottom at 4px
- Date: Thu, 22 Jan 2015 18:52:09 +0000 (UTC)
commit 554ef1d80bc27cb5ab00415defa196fbbd71dbfd
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Jan 22 13:31:08 2015 -0500
event-widget: hardcode padding-top/bottom at 4px
This is necessary in order to properly style slanted edges on widgets
who need it on both start and end.
src/gcal-event-widget.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c
index 83c8d19..37a7e30 100644
--- a/src/gcal-event-widget.c
+++ b/src/gcal-event-widget.c
@@ -389,7 +389,6 @@ gcal_event_widget_get_preferred_height (GtkWidget *widget,
gint *natural)
{
GtkBorder margin;
- GtkBorder padding;
PangoLayout *layout;
gint height;
@@ -400,12 +399,9 @@ gcal_event_widget_get_preferred_height (GtkWidget *widget,
gtk_style_context_get_margin (gtk_widget_get_style_context (widget),
gtk_widget_get_state_flags (widget),
&margin);
- gtk_style_context_get_padding (gtk_widget_get_style_context (widget),
- gtk_widget_get_state_flags (widget),
- &padding);
*minimum = *natural =
- height + padding.top + padding.bottom + margin.top + margin.bottom;
+ height + 4 + 4 + margin.top + margin.bottom;
g_object_unref (layout);
}
@@ -590,7 +586,7 @@ gcal_event_widget_draw (GtkWidget *widget,
gtk_render_layout (context, cr,
x + padding.left + left_gap,
- y + padding.top,
+ y + 4,
layout);
/* render reminder icon */
@@ -616,7 +612,7 @@ gcal_event_widget_draw (GtkWidget *widget,
gdk_cairo_set_source_pixbuf (cr,
pixbuf,
x + padding.left,
- y + padding.top + ((icon_size - (16 * multiplier)) / 2));
+ y + 4 + ((icon_size - (16 * multiplier)) / 2));
g_object_unref (pixbuf);
cairo_paint (cr);
}
@@ -644,7 +640,7 @@ gcal_event_widget_draw (GtkWidget *widget,
gdk_cairo_set_source_pixbuf (cr,
pixbuf,
width - right_gap,
- y + padding.top + ((icon_size - (16 * multiplier)) / 2));
+ y + 4 + ((icon_size - (16 * multiplier)) / 2));
g_object_unref (pixbuf);
cairo_paint (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]