diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 18:36:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 18:38:32 +0300 |
commit | 7fdde7fd86f2448700e6473ae4bc5f8b1d4b1208 (patch) | |
tree | b32a5003a4261adb1a291bc01c3a444c8943119b /release/scripts/startup/bl_ui/space_view3d_toolbar.py | |
parent | ec8a20fec0d103a799b9d9c86b0b55fba3b02b84 (diff) |
UI: use draw_header function for popover buttons
Add 'is_popover' for panel draw functions to check if they're in a popup.
This puts dyntopo toggle next to the popover.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index cb9ddd470ce..6b515f63c73 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -883,12 +883,13 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): return (context.sculpt_object and context.tool_settings.sculpt) def draw_header(self, context): + is_popover = self.is_popover layout = self.layout layout.operator( "sculpt.dynamic_topology_toggle", icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', text="", - emboss=False, + emboss=is_popover, ) def draw(self, context): |