Respect alignment in wxOSX wxTextCtrl::SetStyle()
Honour the alignment specified in the style, if any. Closes #17529.
This commit is contained in:
committed by
Vadim Zeitlin
parent
d5c008da03
commit
6615c06d31
@@ -862,6 +862,22 @@ void wxNSTextViewControl::SetStyle(long start,
|
||||
if ( style.HasTextColour() )
|
||||
[storage addAttribute:NSForegroundColorAttributeName value:style.GetTextColour().OSXGetNSColor() range:range];
|
||||
}
|
||||
|
||||
if ( style.HasAlignment() )
|
||||
{
|
||||
switch ( style.GetAlignment() )
|
||||
{
|
||||
case wxTEXT_ALIGNMENT_RIGHT:
|
||||
[m_textView setAlignment:NSRightTextAlignment];
|
||||
break;
|
||||
case wxTEXT_ALIGNMENT_CENTER:
|
||||
[m_textView setAlignment:NSCenterTextAlignment];
|
||||
break;
|
||||
default:
|
||||
[m_textView setAlignment:NSLeftTextAlignment];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxNSTextViewControl::CheckSpelling(bool check)
|
||||
|
Reference in New Issue
Block a user