Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv17797/src/gui
Modified Files:
wxDialogLayout.cpp
Log Message:
treat the case when last == static box specially when creating the controls
Index: wxDialogLayout.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxDialogLayout.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -b -u -2 -r1.89 -r1.90
--- wxDialogLayout.cpp 2 Sep 2002 18:39:03 -0000 1.89
+++ wxDialogLayout.cpp 8 Sep 2002 01:32:55 -0000 1.90
@@ -165,8 +165,20 @@
{
if ( last == NULL )
+ {
c->top.SameAs(parent, wxTop, 2*LAYOUT_Y_MARGIN + extraSpace);
- else {
+ }
+ else // have last control above
+ {
+ if ( wxDynamicCast(last, wxStaticBox) )
+ {
+ // special case: last is not the control above us but the static box
+ // containing us
+ c->top.SameAs(last, wxTop, 3*LAYOUT_Y_MARGIN);
+ }
+ else
+ {
size_t margin = LAYOUT_Y_MARGIN;
- if ( last->IsKindOf(CLASSINFO(wxListBox)) ) {
+ if ( last->IsKindOf(CLASSINFO(wxListBox)) )
+ {
// listbox has a surrounding box, so leave more space
margin *= 4;
@@ -175,4 +187,5 @@
c->top.Below(last, margin + extraSpace);
}
+ }
}
@@ -227,11 +240,11 @@
SetTopConstraint(parent, c, last,
#ifdef __WXMSW__
- LAYOUT_Y_MARGIN
+ -LAYOUT_Y_MARGIN
#else
0
#endif // __WXMSW__
);
- c->left.SameAs(parent, wxLeft, widthMax);
- c->width.AsIs();
+ c->left.SameAs(parent, wxLeft, 2*LAYOUT_X_MARGIN + widthMax);
+ c->right.SameAs(parent, wxRight, LAYOUT_X_MARGIN + nRightMargin);
c->height.AsIs();
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates