Add support for paragraph spacing attribute to wxTextCtrl in wxMSW.

Use PFM_SPACEAFTER/PFM_SPACEBEFORE to implement support for them.

Closes #16417.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-14 12:17:08 +00:00
parent 85dc641c8e
commit 08547057c5
2 changed files with 19 additions and 0 deletions

View File

@@ -607,6 +607,7 @@ wxMSW:
- Fix appearance of wxToggleButtons with non default colours (Artur Wieczorek).
- Fix drawing on wxDC when using right-to-left layout (Artur Wieczorek).
- Fix wxGrid appearance and behaviour in RTL (Artur Wieczorek).
- Add paragraph spacing attributes support to wxTextCtrl (dannchr).
3.0.1: (released 2014-06-15)

View File

@@ -2817,6 +2817,24 @@ bool wxTextCtrl::MSWSetParaFormat(const wxTextAttr& style, long start, long end)
}
}
#if wxUSE_RICHEDIT2
if ( style.HasParagraphSpacingAfter() )
{
pf.dwMask |= PFM_SPACEAFTER;
// Convert from 1/10 mm to TWIPS
pf.dySpaceAfter = (int) (((double) style.GetParagraphSpacingAfter()) * mm2twips / 10.0) ;
}
if ( style.HasParagraphSpacingBefore() )
{
pf.dwMask |= PFM_SPACEBEFORE;
// Convert from 1/10 mm to TWIPS
pf.dySpaceBefore = (int) (((double) style.GetParagraphSpacingBefore()) * mm2twips / 10.0) ;
}
#endif // wxUSE_RICHEDIT2
#if wxUSE_RICHEDIT2
if ( m_verRichEdit > 1 )
{