From 41b56d87e7f664543309841d064821636c2561c9 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 28 Nov 2011 17:33:19 -0500 Subject: [PATCH] themingengine: move code to make switch-case more clear Code is more readable with the default case as the last one in the switch block. --- gtk/gtkthemingengine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index 27740515c6..b861f91a78 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -1478,6 +1478,12 @@ render_background_internal (GtkThemingEngine *engine, bg_width = width; bg_height = height; break; + case GTK_CSS_AREA_CONTENT_BOX: + bg_x = border.left + padding.left; + bg_y = border.top + padding.top; + bg_width = width - border.left - border.right - padding.left - padding.right; + bg_height = height - border.top - border.bottom - padding.top - padding.bottom; + break; case GTK_CSS_AREA_PADDING_BOX: default: bg_x = border.left; @@ -1485,12 +1491,6 @@ render_background_internal (GtkThemingEngine *engine, bg_width = width - border.left - border.left; bg_height = height - border.top - border.bottom; break; - case GTK_CSS_AREA_CONTENT_BOX: - bg_x = border.left + padding.left; - bg_y = border.top + padding.top; - bg_width = width - border.left - border.right - padding.left - padding.right; - bg_height = height - border.top - border.bottom - padding.top - padding.bottom; - break; } context.width = bg_width;