From acca04bf33a5082cad0cee137d4a7a1fec81350d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Aug 2010 15:17:44 +0000 Subject: remove narrow ui feature - re-arranged UI in a way that gave far too much vert scrolling. - was added all over for simple things like making text="", layout engine should handle this. - Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases. --- release/scripts/ui/properties_data_camera.py | 47 +++++++++------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'release/scripts/ui/properties_data_camera.py') diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index 15d513b5a25..75bf2eb86d2 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -20,8 +20,6 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = bpy.context.user_preferences.view.properties_width_check - class DataButtonsPanel(): bl_space_type = 'PROPERTIES' @@ -45,21 +43,14 @@ class DATA_PT_context_camera(DataButtonsPanel, bpy.types.Panel): ob = context.object cam = context.camera space = context.space_data - wide_ui = context.region.width > narrowui - - if wide_ui: - split = layout.split(percentage=0.65) - if ob: - split.template_ID(ob, "data") - split.separator() - elif cam: - split.template_ID(space, "pin_id") - split.separator() - else: - if ob: - layout.template_ID(ob, "data") - elif cam: - layout.template_ID(space, "pin_id") + + split = layout.split(percentage=0.65) + if ob: + split.template_ID(ob, "data") + split.separator() + elif cam: + split.template_ID(space, "pin_id") + split.separator() class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel, bpy.types.Panel): @@ -85,12 +76,8 @@ class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel): layout = self.layout cam = context.camera - wide_ui = context.region.width > narrowui - if wide_ui: - layout.prop(cam, "type", expand=True) - else: - layout.prop(cam, "type", text="") + layout.prop(cam, "type", expand=True) split = layout.split() @@ -100,8 +87,7 @@ class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel): col.prop(cam, "lens", text="Angle") elif cam.lens_unit == 'DEGREES': col.prop(cam, "angle") - if wide_ui: - col = split.column() + col = split.column() col.prop(cam, "lens_unit", text="") elif cam.type == 'ORTHO': @@ -116,8 +102,7 @@ class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel): col.prop(cam, "shift_x", text="X") col.prop(cam, "shift_y", text="Y") - if wide_ui: - col = split.column(align=True) + col = split.column(align=True) col.label(text="Clipping:") col.prop(cam, "clip_start", text="Start") col.prop(cam, "clip_end", text="End") @@ -129,10 +114,8 @@ class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel): col = split.column() col.prop(cam, "dof_object", text="") - if wide_ui: - col = split.column() - else: - col = col.column() + col = split.column() + if cam.dof_object != None: col.enabled = False col.prop(cam, "dof_distance", text="Distance") @@ -151,7 +134,6 @@ class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel): layout = self.layout cam = context.camera - wide_ui = context.region.width > narrowui split = layout.split() @@ -161,8 +143,7 @@ class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel): col.prop(cam, "show_title_safe", text="Title Safe") col.prop(cam, "show_name", text="Name") - if wide_ui: - col = split.column() + col = split.column() col.prop(cam, "draw_size", text="Size") col.separator() col.prop(cam, "show_passepartout", text="Passepartout") -- cgit v1.2.3