[Bf-blender-cvs] [fbce8f27c81] blender2.8: UI: Move pin icon to the right in the context breadcrumbs.

Pablo Vazquez noreply at git.blender.org
Tue Nov 6 22:43:24 CET 2018


Commit: fbce8f27c81aca8cbbfc592a10116b5a177b9750
Author: Pablo Vazquez
Date:   Tue Nov 6 22:43:12 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBfbce8f27c81aca8cbbfc592a10116b5a177b9750

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!

===================================================================

M	source/blender/editors/space_buttons/buttons_context.c

===================================================================

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



More information about the Bf-blender-cvs mailing list