Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12355/src/gui
Modified Files:
wxTemplateDialog.cpp
Log Message:
fixed layout of the global templates dialog (the listbox with template names
was tiny and unusable)
Index: wxTemplateDialog.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxTemplateDialog.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -b -u -2 -r1.42 -r1.43
--- wxTemplateDialog.cpp 16 Jan 2006 20:32:28 -0000 1.42
+++ wxTemplateDialog.cpp 19 Aug 2006 14:49:52 -0000 1.43
@@ -528,8 +528,12 @@
}
+ int wLbox = listbox->GetBestSize().x;
+ if ( wLbox > 3*wBtn )
+ wLbox = 3*wBtn;
+
c = new wxLayoutConstraints;
c->top.Below(msg, LAYOUT_Y_MARGIN);
c->left.SameAs(box, wxLeft, 2*LAYOUT_X_MARGIN);
- c->width.AsIs();
+ c->width.Absolute(wLbox);
c->height.Absolute(5*hBtn);
listbox->SetConstraints(c);
@@ -613,5 +617,5 @@
m_kind = kind;
- SetDefaultSize(6*wBtn, 10*hBtn);
+ SetDefaultSize(10*wBtn, 10*hBtn);
}
@@ -756,9 +760,13 @@
// ----------------
+ int wLbox = m_listbox->GetBestSize().x;
+ if ( wLbox > 3*wBtn )
+ wLbox = 3*wBtn;
+
wxLayoutConstraints *c;
c = new wxLayoutConstraints;
c->left.SameAs(box, wxLeft, 2*LAYOUT_X_MARGIN);
c->top.SameAs(box, wxTop, 4*LAYOUT_Y_MARGIN);
- c->width.AsIs();
+ c->width.Absolute(wLbox);
c->bottom.SameAs(box, wxBottom, 2*LAYOUT_Y_MARGIN);
m_listbox->SetConstraints(c);
@@ -888,8 +896,12 @@
FillListBox();
+ int wLbox = m_listbox->GetBestSize().x;
+ if ( wLbox > 3*wBtn )
+ wLbox = 3*wBtn;
+
c = new wxLayoutConstraints;
c->top.Below(combo, 2*LAYOUT_Y_MARGIN);
c->left.SameAs(msg, wxLeft, 2*LAYOUT_X_MARGIN);
- c->width.AsIs();
+ c->width.Absolute(wLbox);
c->bottom.SameAs(box, wxBottom, 2*LAYOUT_Y_MARGIN);
m_listbox->SetConstraints(c);
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates