[gtk+] themingengine: move code to make switch-case more clear



commit 41b56d87e7f664543309841d064821636c2561c9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Nov 28 17:33:19 2011 -0500

    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 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 2774051..b861f91 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]