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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user