Fix for [#22714] Constraints stack : move up and move down buttons problem

* Constraint template now uses 2 rows as well, when the area width is small. 
* UI Code could use some code/layout cleanup still, will look into that soon.
This commit is contained in:
2010-07-04 09:42:00 +00:00
parent db4d317f6b
commit ce94f52dbc
6 changed files with 42 additions and 22 deletions

View File

@@ -20,6 +20,7 @@
import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check
narrowcon = 260
class ConstraintButtonsPanel(bpy.types.Panel):
@@ -30,8 +31,9 @@ class ConstraintButtonsPanel(bpy.types.Panel):
def draw_constraint(self, context, con):
layout = self.layout
box = layout.template_constraint(con)
wide_ui = context.region.width > narrowui
compact_con = context.region.width < narrowcon
box = layout.template_constraint(con, compact = compact_con)
if box:
# match enum type to our functions, avoids a lookup table.