Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv28801
Modified Files:
Images.cpp MainDlg.cpp
Log Message:
Tweaked toolbar button size calculation algorithm.
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- Images.cpp 13 Jan 2004 23:10:26 -0000 1.56
+++ Images.cpp 14 Jan 2004 10:21:22 -0000 1.57
@@ -217,14 +217,16 @@
wxBitmap tmp(100, 100);
mdc.SelectObject(tmp);
- wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
- fnt.SetWeight(wxBOLD);
+ wxFont fnt = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
mdc.SetFont(fnt);
for (i=0;i<names.GetCount();i++) {
mdc.GetTextExtent(names.Item(i), &x, &y);
- x+=6;
+ x+=15;
y+=36;
+ if (y > x) { /* Don't allow buttons with height > width */
+ x = y;
+ }
x>tool_img_width ? tool_img_width=x : x=tool_img_width;
y>tool_img_height ? tool_img_height=y : y=tool_img_width;
}
Index: MainDlg.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- MainDlg.cpp 14 Jan 2004 10:05:50 -0000 1.58
+++ MainDlg.cpp 14 Jan 2004 10:21:22 -0000 1.59
@@ -334,7 +334,7 @@
if (pages.IsEmpty()) {
break;
}
- names.Add(pages.Item(i)->GetKeyString());
+ names.Add(pages[i]->short_title);
}
names.Add(_("Connect"));
names.Add(_("Options"));
|