From: <ma...@us...> - 2003-12-29 03:54:53
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv1896 Modified Files: SBPanel.cpp Images.cpp Log Message: Fixes win9x problems; Bitmapbuttons now use system font. Index: SBPanel.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- SBPanel.cpp 27 Dec 2003 07:18:20 -0000 1.16 +++ SBPanel.cpp 29 Dec 2003 03:54:50 -0000 1.17 @@ -62,18 +62,20 @@ this, -1, title, image, wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); - headerbmpbtn->SetFont( - wxFont(SB_BTN_FONT_SIZE, wxROMAN, wxNORMAL, wxBOLD) - ); + wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT); + fnt.SetWeight(wxBOLD); + headerbmpbtn->SetFont(fnt); + header_btn_id = headerbmpbtn->GetId(); mainsizer->Add(headerbmpbtn, 0, wxGROW); } else { wxButton *headerbtn = new wxButton( this, -1, title, wxDefaultPosition, wxDefaultSize, 0 ); - headerbtn->SetFont( - wxFont(SB_BTN_FONT_SIZE, wxROMAN, wxNORMAL, wxBOLD) - ); + wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT); + fnt.SetWeight(wxBOLD); + headerbmpbtn->SetFont(fnt); + header_btn_id = headerbtn->GetId(); mainsizer->Add(headerbtn, 0, wxGROW|wxADJUST_MINSIZE, 5); } Index: Images.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Images.cpp 27 Dec 2003 14:27:51 -0000 1.45 +++ Images.cpp 29 Dec 2003 03:54:50 -0000 1.46 @@ -300,11 +300,10 @@ tmp_new = wxBitmap(tool_img_width, tool_img_height); mdc.SelectObject(tmp_new); -#ifdef __WXMAC__ - mdc.SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT)); -#else - mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD)); -#endif + wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT); + fnt.SetWeight(wxBOLD); + mdc.SetFont(fnt); + mdc.SetPen(*wxTRANSPARENT_PEN); mdc.BeginDrawing(); @@ -351,11 +350,9 @@ wxBitmap tmp(100, 100); mdc.SelectObject(tmp); -#ifdef __WXMAC__ - mdc.SetFont(wxFont(10, wxDEFAULT, wxNORMAL, wxNORMAL)); -#else - mdc.SetFont(wxFont(10, wxDECORATIVE, wxNORMAL, wxBOLD)); -#endif + wxFont fnt = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT); + fnt.SetWeight(wxBOLD); + mdc.SetFont(fnt); for (i=0;i<names.GetCount();i++) { mdc.GetTextExtent(names.Item(i), &x, &y); |