diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-10 21:25:50 +0300 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2018-07-10 21:25:50 +0300 |
commit | 0953e8af988a0de800cfeb8606ede0f515c589f2 (patch) | |
tree | cb275c9e4e139f6288c3115c7e1a231414c2a396 /release/scripts | |
parent | 8a3366a494cf2939138a96cb93a2b666a3be77c8 (diff) |
UI: Single-column for object type visibility
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d9f17f70e20..b484bf08c3b 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3697,12 +3697,12 @@ class VIEW3D_PT_object_type_visibility(Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True + view = context.space_data col = layout.column() - split = col.split() - heading_pair = ("Visible", "Selectable") attr_object_types = ( "mesh", @@ -3722,17 +3722,13 @@ class VIEW3D_PT_object_type_visibility(Panel): attr_vis = [f"show_object_viewport_{attr}" for attr in attr_object_types] attr_sel = [f"show_object_select_{attr}" for attr in attr_object_types] - sub = split.column() - sub.label("Visible") - for attr_v in attr_vis: - sub.prop(view, attr_v) - - sub = split.column() - sub.label("Selectable") for attr_v, attr_s in zip(attr_vis, attr_sel): - row = sub.row(align=True) + icon_s = 'RESTRICT_SELECT_OFF' if getattr(view, attr_s) else 'RESTRICT_SELECT_ON' + + row = col.row(align=True) + row.prop(view, attr_v) row.active = getattr(view, attr_v) - row.prop(view, attr_s) + row.prop(view, attr_s, text="", icon=icon_s, emboss=False) class VIEW3D_PT_shading(Panel): |