summaryrefslogtreecommitdiff
path: root/gtk/gtkrender.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-01-17 05:11:40 +0100
committerBenjamin Otte <otte@redhat.com>2015-01-19 01:15:20 +0100
commit858c80f33e335b45c4c7177e63a981123bd7bd17 (patch)
tree6b7bd2fc9567f7a715e9af7382e08b23cc961875 /gtk/gtkrender.c
parent8b11e93a2dbe33c16810749ace5379d200fdc471 (diff)
downloadgtk+-858c80f33e335b45c4c7177e63a981123bd7bd17.tar.gz
render: Replace gtk_style_context_get_border/padding()
Use _gtk_style_context_peek_property() instead.
Diffstat (limited to 'gtk/gtkrender.c')
-rw-r--r--gtk/gtkrender.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index 6b3b267a0f..bfdad8e6ec 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -110,7 +110,10 @@ gtk_do_render_check (GtkStyleContext *context,
fg_color = _gtk_css_rgba_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR));
bg_color = _gtk_css_rgba_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BACKGROUND_COLOR));
- gtk_style_context_get_border (context, flags, &border);
+ border.top = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100);
+ border.right = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100);
+ border.bottom = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100);
+ border.left = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100);
border_style = _gtk_css_border_style_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_STYLE));
border_width = MIN (MIN (border.top, border.bottom),
@@ -266,7 +269,10 @@ gtk_do_render_option (GtkStyleContext *context,
fg_color = _gtk_css_rgba_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR));
bg_color = _gtk_css_rgba_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BACKGROUND_COLOR));
- gtk_style_context_get_border (context, flags, &border);
+ border.top = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100);
+ border.right = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100);
+ border.bottom = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100);
+ border.left = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100);
border_style = _gtk_css_border_style_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_STYLE));
exterior_size = MIN (width, height);
@@ -1429,16 +1435,17 @@ gtk_do_render_frame_gap (GtkStyleContext *context,
gdouble xy1_gap)
{
GtkJunctionSides junction;
- GtkStateFlags state;
gint border_width;
GtkCssValue *corner[4];
gdouble x0, y0, x1, y1, xc = 0.0, yc = 0.0, wc = 0.0, hc = 0.0;
GtkBorder border;
- state = gtk_style_context_get_state (context);
junction = gtk_style_context_get_junction_sides (context);
- gtk_style_context_get_border (context, state, &border);
+ border.top = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100);
+ border.right = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100);
+ border.bottom = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100);
+ border.left = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100);
corner[GTK_CSS_TOP_LEFT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS);
corner[GTK_CSS_TOP_RIGHT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS);
corner[GTK_CSS_BOTTOM_LEFT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS);