Reverted 6e9bc98 due to bug in GDI+ and newline

http://rainmeter.net/forum/viewtopic.php?p=89915#p89915
This commit is contained in:
Brian Ferguson 2013-07-16 12:28:05 -06:00
parent ed9ea73e6b
commit f76634055d
2 changed files with 3 additions and 4 deletions

View File

@ -181,7 +181,7 @@ bool CanvasGDIP::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForm
stringFormat.SetTrimming(Gdiplus::StringTrimmingNone); stringFormat.SetTrimming(Gdiplus::StringTrimmingNone);
const INT stringFormatFlags = stringFormat.GetFormatFlags(); const INT stringFormatFlags = stringFormat.GetFormatFlags();
stringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces | Gdiplus::StringFormatFlagsNoClip); stringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsNoClip);
INT linesFilled = 0; INT linesFilled = 0;
const Gdiplus::Status status = m_Graphics->MeasureString( const Gdiplus::Status status = m_Graphics->MeasureString(

View File

@ -101,13 +101,12 @@ void TextFormatGDIP::SetTrimming(bool trim)
if (trim) if (trim)
{ {
m_StringFormat.SetTrimming(Gdiplus::StringTrimmingEllipsisCharacter); m_StringFormat.SetTrimming(Gdiplus::StringTrimmingEllipsisCharacter);
m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces); m_StringFormat.SetFormatFlags(0x0);
} }
else else
{ {
m_StringFormat.SetTrimming(Gdiplus::StringTrimmingNone); m_StringFormat.SetTrimming(Gdiplus::StringTrimmingNone);
m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces | m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsNoClip | Gdiplus::StringFormatFlagsNoWrap);
Gdiplus::StringFormatFlagsNoClip | Gdiplus::StringFormatFlagsNoWrap);
} }
} }