]> git.mxchange.org Git - flightgear.git/commitdiff
Jim Wilson:
authorehofman <ehofman>
Fri, 23 Jul 2004 07:36:32 +0000 (07:36 +0000)
committerehofman <ehofman>
Fri, 23 Jul 2004 07:36:32 +0000 (07:36 +0000)
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

index 7842fcacc9cfed36d85ebecf3f0c2f20f25e3999..d465c79203a2a4ceef913fc1e34f2e74c98143df 100644 (file)
@@ -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"))