From: Stefan Csomor Date: Sun, 28 Mar 2004 19:42:18 +0000 (+0000) Subject: added native alignement support X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/03c4c72be65175f847770e183d3333862878bc67?ds=inline added native alignement support git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 1c98aa536b..4ebd816b71 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -673,8 +673,18 @@ void wxWindowMac::MacUpdateControlFont() fontStyle.size = m_font.MacGetFontSize() ; 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.flags |= kControlUseForeColorMask ; + ::SetControlFontStyle( (ControlRef) m_macControl , &fontStyle ); Refresh() ; }