From 1a87ef23f5fbb0743360650af620d8686a367491 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 23 Jul 2004 07:36:32 +0000 Subject: [PATCH] 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. --- src/GUI/layout.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GUI/layout.cxx b/src/GUI/layout.cxx index 7842fcacc..d465c7920 100644 --- a/src/GUI/layout.cxx +++ b/src/GUI/layout.cxx @@ -24,7 +24,10 @@ bool LayoutWidget::eq(const char* a, const char* b) int LayoutWidget::padding() { 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")) pad = parent().getNum("default-padding"); if(hasField("padding"))