[Bf-blender-cvs] [00e00481758] experimental-build: UI: Changes to the 'single-column' layout to have left-aligned labels on top of the values
Ines Almeida
noreply at git.blender.org
Sat Oct 13 20:17:22 CEST 2018
Commit: 00e00481758f9f9a9186bb8ad8f9ee2afb27ee5a
Author: Ines Almeida
Date: Sat Oct 13 20:01:42 2018 +0200
Branches: experimental-build
https://developer.blender.org/rB00e00481758f9f9a9186bb8ad8f9ee2afb27ee5a
UI: Changes to the 'single-column' layout to have left-aligned labels on top of the values
===================================================================
M release/scripts/startup/bl_ui/properties_animviz.py
M release/scripts/startup/bl_ui/properties_object.py
M release/scripts/startup/bl_ui/properties_render.py
M release/scripts/startup/bl_ui/space_userpref.py
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/editors/include/UI_interface.h
M source/blender/editors/interface/interface_layout.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/screen/screen_ops.c
M source/blender/editors/space_image/image_buttons.c
M source/blender/editors/space_view3d/view3d_buttons.c
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_ui.c
M source/blender/makesrna/intern/rna_ui_api.c
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index eb031b54caa..c031316c219 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -43,7 +43,8 @@ class MotionPathButtonsPanel:
if mps.type == 'CURRENT_FRAME':
col = layout.column(align=True)
- col.prop(mps, "frame_before", text="Frame Range Before")
+ col.label(text="Frame Range")
+ col.prop(mps, "frame_before", text="Before")
col.prop(mps, "frame_after", text="After")
col.prop(mps, "frame_step", text="Step")
elif mps.type == 'RANGE':
@@ -55,7 +56,8 @@ class MotionPathButtonsPanel:
else:
sub.operator("object.paths_range_update", text="", icon='TIME')
sub = row.column(align=True)
- sub.prop(mps, "frame_start", text="Frame Range Start")
+ sub.label(text="Frame Range")
+ sub.prop(mps, "frame_start", text="Start")
sub.prop(mps, "frame_end", text="End")
sub.prop(mps, "frame_step", text="Step")
@@ -63,9 +65,11 @@ class MotionPathButtonsPanel:
col = layout.column(align=True)
col.enabled = False
if bones:
- col.prop(mpath, "frame_start", text="Bone Cache From")
+ col.label(text="Bone Cache")
+ col.prop(mpath, "frame_start", text="From")
else:
- col.prop(mpath, "frame_start", text="Cache From")
+ col.label(text="Cache")
+ col.prop(mpath, "frame_start", text="From")
col.prop(mpath, "frame_end", text="To")
row = layout.row(align=True)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 1c1db517360..945d0ec4683 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -54,48 +54,51 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
ob = context.object
+ # Location.
col = flow.column()
row = col.row(align=True)
row.prop(ob, "location")
- row.use_property_decorate = False
- row.prop(ob, "lock_location", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ sub = row.column(align=True)
+ sub.use_property_decorate = False
+ sub.label(text="") # Empty row for alignment (matches the property name).
+ sub.prop(ob, "lock_location", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ # Rotation.
+ col = flow.column()
+ row = col.row(align=True)
+ left = row.column(align=True)
if ob.rotation_mode == 'QUATERNION':
- col = flow.column()
- row = col.row(align=True)
- row.prop(ob, "rotation_quaternion", text="Rotation")
- sub = row.column(align=True)
- sub.use_property_decorate = False
- sub.prop(ob, "lock_rotation_w", text="", emboss=False, icon='DECORATE_UNLOCKED')
- sub.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ left.prop(ob, "rotation_quaternion", text="Rotation")
+ right = row.column(align=True)
+ right.use_property_decorate = False
+ right.label(text="") # Empty row for alignment (matches the property name).
+ right.prop(ob, "lock_rotation_w", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ right.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
elif ob.rotation_mode == 'AXIS_ANGLE':
- # row.column().label(text="Rotation")
- #row.column().prop(pchan, "rotation_angle", text="Angle")
- #row.column().prop(pchan, "rotation_axis", text="Axis")
- col = flow.column()
- row = col.row(align=True)
- row.prop(ob, "rotation_axis_angle", text="Rotation")
-
- sub = row.column(align=True)
- sub.use_property_decorate = False
- sub.prop(ob, "lock_rotation_w", text="", emboss=False, icon='DECORATE_UNLOCKED')
- sub.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ left.prop(ob, "rotation_axis_angle", text="Rotation")
+ right = row.column(align=True)
+ right.use_property_decorate = False
+ right.label(text="") # Empty row for alignment (matches the property name).
+ right.prop(ob, "lock_rotation_w", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ right.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
else:
- col = flow.column()
- row = col.row(align=True)
- row.prop(ob, "rotation_euler", text="Rotation")
- row.use_property_decorate = False
- row.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
-
+ left.prop(ob, "rotation_euler", text="Rotation")
+ right = row.column(align=True)
+ right.use_property_decorate = False
+ right.label(text="") # Empty row for alignment (matches the property name).
+ right.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
+ # Rotation Mode.
+ row = left.row(align=True)
+ row.prop(ob, "rotation_mode", text="")
+
+ # Scale.
col = flow.column()
row = col.row(align=True)
row.prop(ob, "scale")
- row.use_property_decorate = False
- row.prop(ob, "lock_scale", text="", emboss=False, icon='DECORATE_UNLOCKED')
-
- row = layout.row(align=True)
- row.prop(ob, "rotation_mode")
- row.label(text="", icon='BLANK1')
+ sub = row.column(align=True)
+ sub.use_property_decorate = False
+ sub.label(text="") # Empty row for alignment (matches the property name).
+ sub.prop(ob, "lock_scale", text="", emboss=False, icon='DECORATE_UNLOCKED')
class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 34a21b76143..0721270577e 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -142,30 +142,34 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
scene = context.scene
rd = scene.render
- col = layout.column(align=True)
- col.prop(rd, "resolution_x", text="Resolution X")
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+
+ col = flow.column(align=True)
+ col.label(text="Resolution")
+ col.prop(rd, "resolution_x", text="X")
col.prop(rd, "resolution_y", text="Y")
col.prop(rd, "resolution_percentage", text="%")
- col = layout.column(align=True)
- col.prop(rd, "pixel_aspect_x", text="Aspect X")
+ col = flow.column(align=True)
+ col.label(text="Frame Range")
+ col.prop(scene, "frame_start", text="Start")
+ col.prop(scene, "frame_end", text="End")
+ col.prop(scene, "frame_step", text="Step")
+
+ col = flow.column(align=True)
+ col.label(text="Aspect Ratio")
+ col.prop(rd, "pixel_aspect_x", text="X")
col.prop(rd, "pixel_aspect_y", text="Y")
- col = layout.column(align=True)
+ col = flow.column(align=True)
col.prop(rd, "use_border", text="Border")
sub = col.column(align=True)
sub.active = rd.use_border
sub.prop(rd, "use_crop_to_border", text="Crop")
- col = layout.column(align=True)
- col.prop(scene, "frame_start", text="Frame Start")
- col.prop(scene, "frame_end", text="End")
- col.prop(scene, "frame_step", text="Step")
-
- col = layout.split()
- col.alignment = 'RIGHT'
+ col = flow.column(align=True)
col.label(text="Frame Rate")
- self.draw_framerate(layout, col, rd)
+ self.draw_framerate(flow, col, rd)
class RENDER_PT_frame_remapping(RenderButtonsPanel, Panel):
@@ -252,9 +256,9 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
col = flow.column()
col.prop(rd, "use_stamp_strip_meta", text="Use Strip Metadata")
- row = layout.split(factor=0.3)
- row.prop(rd, "use_stamp_note", text="Note")
- sub = row.row()
+ col = layout.column()
+ col.prop(rd, "use_stamp_note", text="Note")
+ sub = col.column()
sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 1516494abbc..326e8b57574 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -156,6 +156,7 @@ class USERPREF_PT_interface(Panel):
col.label(text="Development:")
col.prop(view, "show_tooltips_python")
col.prop(view, "show_developer_ui")
+ col.prop(view, "layout_row_enums")
row = split.row()
row.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ea71eb88d97..d80b1387e35 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3892,15 +3892,15 @@ class VIEW3D_PT_view3d_properties(Panel):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
- col = flow.column()
+ col = layout.column()
subcol = col.column()
subcol.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews)
subcol.prop(view, "lens", text="Focal Length")
subcol = col.column(align=True)
- subcol.pr
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list