diff options
author | Julian Eisel <julian@blender.org> | 2020-10-21 13:18:30 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-10-21 18:25:37 +0300 |
commit | 187cc5e26d28b1a89e667915fa3a458f32f7f4a9 (patch) | |
tree | 7193a82a4a2f213528deed7160a04d67271a7dab /source/blender/editors/space_buttons | |
parent | dd82a0d6239124a14bb554296364f6c951a8491e (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) |