[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26417] trunk/blender/release/scripts/ui: Small UI Tweak:
Thomas Dinges
dingto at gmx.de
Sat Jan 30 09:45:32 CET 2010
Revision: 26417
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26417
Author: dingto
Date: 2010-01-30 09:45:31 +0100 (Sat, 30 Jan 2010)
Log Message:
-----------
Small UI Tweak:
Let "Add Constraint" Button use the whole space, like the "Add Modifier" Button.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_data_modifier.py
trunk/blender/release/scripts/ui/properties_object_constraint.py
Modified: trunk/blender/release/scripts/ui/properties_data_modifier.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_modifier.py 2010-01-30 05:08:42 UTC (rev 26416)
+++ trunk/blender/release/scripts/ui/properties_data_modifier.py 2010-01-30 08:45:31 UTC (rev 26417)
@@ -37,10 +37,9 @@
ob = context.object
wide_ui = context.region.width > narrowui
compact_mod = context.region.width < narrowmod
+
+ layout.operator_menu_enum("object.modifier_add", "type")
- row = layout.row()
- row.operator_menu_enum("object.modifier_add", "type")
-
for md in ob.modifiers:
box = layout.template_modifier(md, compact=compact_mod)
if box:
Modified: trunk/blender/release/scripts/ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_object_constraint.py 2010-01-30 05:08:42 UTC (rev 26416)
+++ trunk/blender/release/scripts/ui/properties_object_constraint.py 2010-01-30 08:45:31 UTC (rev 26417)
@@ -730,13 +730,10 @@
def draw(self, context):
layout = self.layout
+
ob = context.object
- wide_ui = context.region.width > narrowui
- row = layout.row()
- row.operator_menu_enum("object.constraint_add", "type")
- if wide_ui:
- row.label()
+ layout.operator_menu_enum("object.constraint_add", "type")
for con in ob.constraints:
self.draw_constraint(context, con)
@@ -755,12 +752,8 @@
ob = context.object
pchan = ob.pose.bones[context.bone.name]
- wide_ui = context.region.width > narrowui
- row = layout.row()
- row.operator_menu_enum("pose.constraint_add", "type")
- if wide_ui:
- row.label()
+ layout.operator_menu_enum("pose.constraint_add", "type")
for con in pchan.constraints:
self.draw_constraint(context, con)
More information about the Bf-blender-cvs
mailing list