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 | |
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.
m--------- | release/scripts/addons | 0 | ||||
m--------- | release/scripts/addons_contrib | 0 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_properties.py | 4 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 9 |
4 files changed, 9 insertions, 4 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 8ad9de7c1e1022dee907ddce78f4c357111fc09 +Subproject 33eae7da675d532bbb9c12b129c0e30228f5f00 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib -Subproject 26a8b2eadc7abb2a30fac50eb5505aa24daf578 +Subproject eae381b698248e70e4a3c62bdf239f9d5a0470a diff --git a/release/scripts/startup/bl_ui/space_properties.py b/release/scripts/startup/bl_ui/space_properties.py index fe5057bed5d..4b1bfbbf1f2 100644 --- a/release/scripts/startup/bl_ui/space_properties.py +++ b/release/scripts/startup/bl_ui/space_properties.py @@ -35,10 +35,6 @@ class PROPERTIES_HT_header(Header): layout.separator_spacer() - row = layout.row() - row.emboss = 'NONE' - row.operator("buttons.toggle_pin", icon=('PINNED' if view.use_pin_id else 'UNPINNED'), text="") - class PROPERTIES_PT_navigation_bar(Panel): bl_space_type = 'PROPERTIES' 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) |