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.
This commit is contained in:
Cosimo Cecchi 2011-11-28 17:33:19 -05:00
parent 03217c2019
commit 41b56d87e7

View File

@ -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;