Re: [Flightgear-devel] [PATCH] shrinking dialogs

2004-07-23 Thread Erik Hofman
Jim Wilson wrote:
This is a workaround for an issue where the xml dialogs were shrinking on
subsequent pops.
Committed. Thanks.
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] [PATCH] shrinking dialogs

2004-07-22 Thread 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.



Index: src/GUI/layout.cxx
===
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/GUI/layout.cxx,v
retrieving revision 1.2
diff -u -r1.2 layout.cxx
--- src/GUI/layout.cxx  14 May 2004 17:16:35 -  1.2
+++ src/GUI/layout.cxx  22 Jul 2004 19:16:08 -
@@ -24,7 +24,10 @@
 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))




___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel