added native alignement support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f6809556cf
commit
03c4c72be6
@ -673,8 +673,18 @@ void wxWindowMac::MacUpdateControlFont()
|
|||||||
fontStyle.size = m_font.MacGetFontSize() ;
|
fontStyle.size = m_font.MacGetFontSize() ;
|
||||||
fontStyle.flags = kControlUseFontMask | kControlUseFaceMask | kControlUseSizeMask ;
|
fontStyle.flags = kControlUseFontMask | kControlUseFaceMask | kControlUseSizeMask ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fontStyle.just = teJustLeft ;
|
||||||
|
fontStyle.flags |= kControlUseJustMask ;
|
||||||
|
if ( ( GetWindowStyle() & wxALIGN_MASK ) & wxALIGN_CENTER_HORIZONTAL )
|
||||||
|
fontStyle.just = teJustCenter ;
|
||||||
|
else if ( ( GetWindowStyle() & wxALIGN_MASK ) & wxALIGN_RIGHT )
|
||||||
|
fontStyle.just = teJustRight ;
|
||||||
|
|
||||||
|
|
||||||
fontStyle.foreColor = MAC_WXCOLORREF(GetForegroundColour().GetPixel() ) ;
|
fontStyle.foreColor = MAC_WXCOLORREF(GetForegroundColour().GetPixel() ) ;
|
||||||
fontStyle.flags |= kControlUseForeColorMask ;
|
fontStyle.flags |= kControlUseForeColorMask ;
|
||||||
|
|
||||||
::SetControlFontStyle( (ControlRef) m_macControl , &fontStyle );
|
::SetControlFontStyle( (ControlRef) m_macControl , &fontStyle );
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user