diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-11-07 00:43:12 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-11-07 00:43:12 +0300 |
commit | fbce8f27c81aca8cbbfc592a10116b5a177b9750 (patch) | |
tree | df51f73fe87708b3f6ae067da9b4924d2f632bb7 /source/blender/editors/space_buttons | |
parent | a55ef183094f72bb92c169ee0d3dce13374857ee (diff) |
UI: Move pin icon to the right in the context breadcrumbs.
Leaves more room for the actual breadcrumbs path, and it's less intrusive.
Thanks Luciano for the suggestion!
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 4e66313230b..e63dd799582 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1013,13 +1013,6 @@ void buttons_context_draw(const bContext *C, uiLayout *layout) row = uiLayoutRow(layout, true); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT); - block = uiLayoutGetBlock(row); - UI_block_emboss_set(block, UI_EMBOSS_NONE); - but = uiDefIconButBitC(block, UI_BTYPE_ICON_TOGGLE, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, - 0, 0, 0, 0, TIP_("Follow context or keep fixed data-block displayed")); - UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */ - UI_but_func_set(but, pin_cb, NULL, NULL); - for (a = 0; a < path->len; a++) { ptr = &path->ptr[a]; @@ -1048,6 +1041,15 @@ void buttons_context_draw(const bContext *C, uiLayout *layout) uiItemL(row, "", icon); } } + + uiItemSpacer(row); + + block = uiLayoutGetBlock(row); + UI_block_emboss_set(block, UI_EMBOSS_NONE); + but = uiDefIconButBitC(block, UI_BTYPE_ICON_TOGGLE, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, + 0, 0, 0, 0, TIP_("Follow context or keep fixed data-block displayed")); + UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */ + UI_but_func_set(but, pin_cb, NULL, NULL); } #ifdef USE_HEADER_CONTEXT_PATH |