Jim Wilson:
This is a workaround for an issue where the xml dialogs were shrinking on subsequent pops. Andy Ross says: That looks like it should be fine for a release-time workaround. The 2 pixel border on dialogs is at best a minor feature, and probably invisible since the sub-frames all have their own padding. Clearly the right fix would be to find out where the code is getting confused by the previous layout. In principle, the layout should be idempotent: if you don't change the layout constraints, it shouldn't change its layout. There's still a bug in there somewhere.
This commit is contained in:
parent
ef84402da1
commit
1a87ef23f5
1 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,10 @@ bool LayoutWidget::eq(const char* a, const char* b)
|
||||||
int LayoutWidget::padding()
|
int LayoutWidget::padding()
|
||||||
{
|
{
|
||||||
int pad = isType("group") ? 0 : 4;
|
int pad = isType("group") ? 0 : 4;
|
||||||
if(isType("dialog")) pad = 2;
|
// As comments above note, this was being set to 2. For some
|
||||||
|
// reason this causes the dialogs to shrink on subsequent pops
|
||||||
|
// so for now we'll make "dialog" padding 0.
|
||||||
|
if(isType("dialog")) pad = 0;
|
||||||
if(hasParent() && parent().hasField("default-padding"))
|
if(hasParent() && parent().hasField("default-padding"))
|
||||||
pad = parent().getNum("default-padding");
|
pad = parent().getNum("default-padding");
|
||||||
if(hasField("padding"))
|
if(hasField("padding"))
|
||||||
|
|
Loading…
Reference in a new issue