[gtk+/box-shadow: 1/5] themingengine: don't modify passed in parameters
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/box-shadow: 1/5] themingengine: don't modify passed in parameters
- Date: Mon, 6 Jun 2011 18:15:44 +0000 (UTC)
commit e84349955e8948c93dbcdcf53d418212af663a8c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jun 1 20:54:33 2011 -0400
themingengine: don't modify passed in parameters
So that we can reuse them later to render a box shadow.
Conflicts:
gtk/gtkthemingengine.c
gtk/gtkthemingengine.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index e2580e7..014e47b 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1986,21 +1986,18 @@ render_frame_internal (GtkThemingEngine *engine,
{
if (border_width > 1)
{
- x += (gdouble) border_width / 2;
- y += (gdouble) border_width / 2;
- width -= border_width;
- height -= border_width;
+ d1 = (gdouble) border_width / 2;
+ d2 = border_width;
}
else if (border_width == 1)
{
- x += 0.5;
- y += 0.5;
- width -= 1;
- height -= 1;
+ d1 = 0.5;
+ d2 = 1;
}
_cairo_round_rectangle_sides (cr, &border_radius,
- x, y, width, height,
+ x + d1, y + d1,
+ width - d2, height - d2,
SIDE_ALL & ~(hidden_side));
cairo_stroke (cr);
}
@@ -2008,7 +2005,8 @@ render_frame_internal (GtkThemingEngine *engine,
{
cairo_save (cr);
_cairo_uneven_frame (cr, &border_radius,
- x, y, width, height,
+ x + d1, y + d1,
+ width - d2, height - d2,
&border);
cairo_fill (cr);
cairo_restore (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]