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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user