Fixed old font-related code that caused problems on wxMAC, also replaced all accesses to m_font with GetFont()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-02-12 16:55:19 +00:00
parent d11c9d86b6
commit 2197ec8012
4 changed files with 10 additions and 37 deletions

View File

@@ -668,7 +668,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
if ( rect.width < 0 )
{
wxCoord x, y;
GetTextExtent(text, &x, &y, 0, 0, &m_font);
pCb->GetTextExtent(text, &x, &y, 0, 0);
rect.width = cis.x + wxCC_CUSTOM_IMAGE_MARGIN1 + wxCC_CUSTOM_IMAGE_MARGIN2 + 9 + x;
}
@@ -1333,7 +1333,7 @@ void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) )
int state = m_state;
if ( !(state & wxSCB_STATE_UNSPECIFIED) &&
m_font.GetWeight() == wxBOLD )
GetFont().GetWeight() == wxBOLD )
state |= wxSCB_STATE_BOLD;
DrawSimpleCheckBox(dc,rect,m_boxHeight,state,txcol);