[Bf-blender-cvs] [187cc5e26d2] master: UI: Move Properties path pin button next to the data-path

Julian Eisel noreply at git.blender.org
Wed Oct 21 17:30:54 CEST 2020


Commit: 187cc5e26d28b1a89e667915fa3a458f32f7f4a9
Author: Julian Eisel
Date:   Wed Oct 21 12:18:30 2020 +0200
Branches: master
https://developer.blender.org/rB187cc5e26d28b1a89e667915fa3a458f32f7f4a9

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
M	release/scripts/addons_contrib
M	release/scripts/startup/bl_ui/space_properties.py
M	source/blender/editors/space_buttons/buttons_context.c

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

diff --git a/release/scripts/addons b/release/scripts/addons
index 8ad9de7c1e1..33eae7da675 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 8ad9de7c1e1022dee907ddce78f4c357111fc09e
+Subproject commit 33eae7da675d532bbb9c12b129c0e30228f5f000
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 26a8b2eadc7..eae381b6982 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 26a8b2eadc7abb2a30fac50eb5505aa24daf5785
+Subproject commit eae381b698248e70e4a3c62bdf239f9d5a0470a9
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)



More information about the Bf-blender-cvs mailing list