Update of /cvsroot/sharedaemon/ui-wx/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26857
Modified Files:
Images.cpp
Log Message:
Fixes text length calculation on mac (thanks Sebastien)
Index: Images.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Images.cpp 27 Nov 2003 10:21:40 -0000 1.23
+++ Images.cpp 27 Nov 2003 12:54:27 -0000 1.24
@@ -170,6 +170,8 @@
/* Temporary bitmap for measuring text lengths. 100 pixels should be enuff. */
tmp = wxBitmap(100, 100);
mdc.SelectObject(tmp);
+
+ mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD));
for (unsigned int i=0;i<btntxt.GetCount();i++) {
mdc.GetTextExtent(btntxt.Item(i), &x, &y);
if (x > width) {
@@ -179,13 +181,12 @@
tool_img_width = width+6;
width = width+6;
- height = y+36;
+ height = y+38;
wxString background;
- m_config->Read(wxT("/General/ToolButtonBackground"), &background, wxT("WHEAT"));
+ m_config->Read(wxT("/General/ToolButtonBackground"), &background, wxT("LIGHT BLUE"));
m_config->Write(wxT("/General/ToolButtonBackground"), background);
mdc.SetBrush(wxBrush(*wxTheColourDatabase->FindColour(background), wxSOLID));
- mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD));
tmp_new = wxBitmap(width, height);
mdc.SelectObject(tmp_new);
|