daboide Commit
Revision 583
Date: 2006-05-28 18:02:30 -0700 (Sun, 28 May 2006)
Author: ed
Changed:
U trunk/ClassDesigner.py
Log:
Set the default for spacers to be added with a proportion of 0, even if the
slot they are filling had a non-zero proportion.
Diff:
Modified: trunk/ClassDesigner.py
===================================================================
--- trunk/ClassDesigner.py 2006-05-27 14:43:16 UTC (rev 582)
+++ trunk/ClassDesigner.py 2006-05-29 01:02:30 UTC (rev 583)
@@ -2317,7 +2317,10 @@
szItem =
controllingSizer.append(newSizer, row=rr,
col=cc, layout="expand")
else:
- szItem =
controllingSizer.insert(sizerPos, newSizer, 1, "x")
+ if isSpacer:
+ szItem =
controllingSizer.insert(sizerPos, newSizer)
+ else:
+ szItem =
controllingSizer.insert(sizerPos, newSizer, 1, "x")
else:
obj.Sizer = newSizer
@@ -2337,6 +2340,10 @@
itm = None
if itm:
if sizerAtts:
+ if isSpacer:
+ sizerAtts["Proportion"] = 0
+ sizerAtts["Halign"] = "center"
+ sizerAtts["Valign"] = "middle"
if not hasattr(itm, "ControllingSizer"):
itm.ControllingSizer = itm.GetUserData()
newSizer.ControllingSizer.setItemProps(itm,
sizerAtts)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev