From 03c4c72be65175f847770e183d3333862878bc67 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 28 Mar 2004 19:42:18 +0000 Subject: [PATCH] added native alignement support git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() ; } -- 2.50.0