Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index a6f8ba4560d..2a4c2aba4a1 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3650,8 +3650,13 @@ static void ui_litem_estimate_box(uiLayout *litem)
uiStyle *style = litem->root->style;
ui_litem_estimate_column(litem, true);
- litem->w += 2 * style->boxspace;
- litem->h += 2 * style->boxspace;
+
+ int boxspace = style->boxspace;
+ if (litem->root->type == UI_LAYOUT_HEADER) {
+ boxspace = 0;
+ }
+ litem->w += 2 * boxspace;
+ litem->h += 2 * boxspace;
}
static void ui_litem_layout_box(uiLayout *litem)
@@ -3661,29 +3666,34 @@ static void ui_litem_layout_box(uiLayout *litem)
uiBut *but;
int w, h;
+ int boxspace = style->boxspace;
+ if (litem->root->type == UI_LAYOUT_HEADER) {
+ boxspace = 0;
+ }
+
w = litem->w;
h = litem->h;
- litem->x += style->boxspace;
- litem->y -= style->boxspace;
+ litem->x += boxspace;
+ litem->y -= boxspace;
if (w != 0) {
- litem->w -= 2 * style->boxspace;
+ litem->w -= 2 * boxspace;
}
if (h != 0) {
- litem->h -= 2 * style->boxspace;
+ litem->h -= 2 * boxspace;
}
ui_litem_layout_column(litem, true);
- litem->x -= style->boxspace;
- litem->y -= style->boxspace;
+ litem->x -= boxspace;
+ litem->y -= boxspace;
if (w != 0) {
- litem->w += 2 * style->boxspace;
+ litem->w += 2 * boxspace;
}
if (h != 0) {
- litem->h += 2 * style->boxspace;
+ litem->h += 2 * boxspace;
}
/* roundbox around the sublayout */