X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ca0d8122ab2ecbce178aa9f21f13270c4ffaca0..8bd2fdfd585609a9237e6a5e813cc51ed9185ab2:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index be4535ea94..180fb5004b 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -1597,6 +1597,12 @@ void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , l ::SetControlFontStyle( m_controlRef , &fontStyle ); } +void wxMacControl::SetBackground( const wxBrush &WXUNUSED(brush) ) +{ + // TODO + // setting up a color proc is not recommended anymore +} + void wxMacControl::SetRange( SInt32 minimum , SInt32 maximum ) { ::SetControl32BitMinimum( m_controlRef , minimum ) ; @@ -1695,8 +1701,8 @@ void wxMacControl::Convert( wxPoint *pt , wxMacControl *from , wxMacControl *to hiPoint.x = pt->x ; hiPoint.y = pt->y ; HIViewConvertPoint( &hiPoint , from->m_controlRef , to->m_controlRef ) ; - pt->x = hiPoint.x ; - pt->y = hiPoint.y ; + pt->x = (int)hiPoint.x ; + pt->y = (int)hiPoint.y ; #endif } @@ -1723,14 +1729,20 @@ void wxMacControl::GetRectInWindowCoords( Rect *r ) void wxMacControl::GetBestRect( Rect *r ) { - Rect bestsize = { 0 , 0 , 0 , 0 } ; short baselineoffset ; GetBestControlRect( m_controlRef , r , &baselineoffset ) ; } void wxMacControl::SetTitle( const wxString &title ) { - UMASetControlTitle( m_controlRef , title , m_font.GetEncoding() ) ; + wxFontEncoding encoding; + + if ( m_font.Ok() ) + encoding = m_font.GetEncoding(); + else + encoding = wxFont::GetDefaultEncoding(); + + UMASetControlTitle( m_controlRef , title , encoding ) ; } void wxMacControl::GetFeatures( UInt32 * features )