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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-06 14:28:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-06 17:00:25 +0300
commitbb09556be5d341b6578ee40c30942fbeb0ffb2a3 (patch)
treea8762132be1896aa448b2ca2578011a8029c25fd /source/blender/editors/screen
parentf55f418867162994c9a0cf7ba89bed3f27a2a354 (diff)
UI: sub panel titles draw smaller and indented.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 9a70d6f23de..034ccdf2e7b 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1825,19 +1825,21 @@ static void ed_panel_draw(const bContext *C,
panel = UI_panel_begin(sa, ar, lb, block, pt, panel, &open);
/* bad fixed values */
- int triangle = (int)(UI_UNIT_Y * 1.1f);
int xco, yco, h = 0;
if (pt->draw_header && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) {
+ int labelx, labely;
+ UI_panel_label_offset(block, &labelx, &labely);
+
/* for enabled buttons */
panel->layout = UI_block_layout(
block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
- triangle, (UI_UNIT_Y * 1.1f) + style->panelspace, UI_UNIT_Y, 1, 0, style);
+ labelx, labely, UI_UNIT_Y, 1, 0, style);
pt->draw_header(C, panel);
UI_block_layout_resolve(block, &xco, &yco);
- panel->labelofs = xco - triangle;
+ panel->labelofs = xco - labelx;
panel->layout = NULL;
}
else {