diff options
author | Benjamin Otte <otte@redhat.com> | 2011-06-11 01:32:43 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-06-11 02:04:17 +0200 |
commit | 06642cab56eb4f30de54b94079687bf2be514ad5 (patch) | |
tree | 3855d849af1719d675fe50f2c9ab375ddb53499e /gtk | |
parent | abca0f050e8c18126ef59c724b141125ec7305bb (diff) | |
download | gtk+-06642cab56eb4f30de54b94079687bf2be514ad5.tar.gz |
themingengine: Remove unnecessary optimization
Code is likely as fast or faster without it, and this saves code.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkthemingengine.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index dc59928c68..6c5d5f0318 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -1957,37 +1957,12 @@ render_frame_internal (GtkThemingEngine *engine, gdk_cairo_set_source_rgba (cr, &border_color); - if (uniform_border) - { - if (border_width > 1) - { - x += (gdouble) border_width / 2; - y += (gdouble) border_width / 2; - width -= border_width; - height -= border_width; - } - else if (border_width == 1) - { - x += 0.5; - y += 0.5; - width -= 1; - height -= 1; - } - - _cairo_round_rectangle_sides (cr, &border_radius, - x, y, width, height, - SIDE_ALL & ~(hidden_side)); - cairo_stroke (cr); - } - else - { - cairo_save (cr); - _cairo_uneven_frame (cr, &border_radius, - x, y, width, height, - &border); - cairo_fill (cr); - cairo_restore (cr); - } + cairo_save (cr); + _cairo_uneven_frame (cr, &border_radius, + x, y, width, height, + &border); + cairo_fill (cr); + cairo_restore (cr); break; case GTK_BORDER_STYLE_INSET: |