From 187cc5e26d28b1a89e667915fa3a458f32f7f4a9 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 21 Oct 2020 12:18:30 +0200 Subject: UI: Move Properties path pin button next to the data-path The pin button should be next to the data-path, which is what it belongs to. Note that this makes the placement of the search button in the header look quite off. That is because it's centered to the absolute header width, not the width of the main region (which is smaller because of the tab region on the left). Technically it's correct that way, visually it looks wrong. This will be addressed in a followup commit. --- source/blender/editors/space_buttons/buttons_context.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 0d1efcab125..60ce86740cd 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1163,6 +1163,15 @@ static void buttons_panel_context_draw(const bContext *C, Panel *panel) first = false; } + + uiLayout *pin_row = uiLayoutRow(row, false); + uiLayoutSetAlignment(pin_row, UI_LAYOUT_ALIGN_RIGHT); + uiItemSpacer(pin_row); + uiLayoutSetEmboss(pin_row, UI_EMBOSS_NONE); + uiItemO(pin_row, + "", + (sbuts->flag & SB_PIN_CONTEXT) ? ICON_PINNED : ICON_UNPINNED, + "BUTTONS_OT_toggle_pin"); } void buttons_context_register(ARegionType *art) -- cgit v1.2.3