[gtk+] themingengine: Get rid of extra variables
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] themingengine: Get rid of extra variables
- Date: Sat, 11 Jun 2011 07:30:42 +0000 (UTC)
commit d8033c3796863173d2b68702fc404d9ffa22452f
Author: Benjamin Otte <otte redhat com>
Date: Sat Jun 11 03:56:56 2011 +0200
themingengine: Get rid of extra variables
Now that we don't change the width/height anymore, we can keep using it
for scaling he background.
gtk/gtkthemingengine.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index dfd110e..51c80b4 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1514,11 +1514,6 @@ render_background_internal (GtkThemingEngine *engine,
GtkCssBorderCornerRadius *top_left_radius, *top_right_radius;
GtkCssBorderCornerRadius *bottom_left_radius, *bottom_right_radius;
GtkCssBorderRadius border_radius = { { 0, }, };
- gdouble mat_w, mat_h;
-
- /* Use unmodified size for pattern scaling */
- mat_w = width;
- mat_h = height;
flags = gtk_theming_engine_get_state (engine);
@@ -1653,9 +1648,9 @@ render_background_internal (GtkThemingEngine *engine,
0, 0, width, height,
SIDE_ALL);
- cairo_scale (cr, mat_w, mat_h);
+ cairo_scale (cr, width, height);
cairo_set_source (cr, other_pattern);
- cairo_scale (cr, 1.0 / mat_w, 1.0 / mat_h);
+ cairo_scale (cr, 1.0 / width, 1.0 / height);
cairo_fill_preserve (cr);
/* Set alpha for posterior drawing
@@ -1738,9 +1733,9 @@ render_background_internal (GtkThemingEngine *engine,
SIDE_ALL);
if (pattern)
{
- cairo_scale (cr, mat_w, mat_h);
+ cairo_scale (cr, width, height);
cairo_set_source (cr, pattern);
- cairo_scale (cr, 1.0 / mat_w, 1.0 / mat_h);
+ cairo_scale (cr, 1.0 / width, 1.0 / height);
}
else
gdk_cairo_set_source_rgba (cr, &bg_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]