From f76634055d6a3030b1904857ebd0ca448302226d Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Tue, 16 Jul 2013 12:28:05 -0600 Subject: [PATCH] Reverted 6e9bc98 due to bug in GDI+ and newline http://rainmeter.net/forum/viewtopic.php?p=89915#p89915 --- Common/Gfx/CanvasGDIP.cpp | 2 +- Common/Gfx/TextFormatGDIP.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Common/Gfx/CanvasGDIP.cpp b/Common/Gfx/CanvasGDIP.cpp index a64ecce8..48f2c149 100644 --- a/Common/Gfx/CanvasGDIP.cpp +++ b/Common/Gfx/CanvasGDIP.cpp @@ -181,7 +181,7 @@ bool CanvasGDIP::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForm stringFormat.SetTrimming(Gdiplus::StringTrimmingNone); const INT stringFormatFlags = stringFormat.GetFormatFlags(); - stringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces | Gdiplus::StringFormatFlagsNoClip); + stringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsNoClip); INT linesFilled = 0; const Gdiplus::Status status = m_Graphics->MeasureString( diff --git a/Common/Gfx/TextFormatGDIP.cpp b/Common/Gfx/TextFormatGDIP.cpp index e8adce0c..ecb0edb8 100644 --- a/Common/Gfx/TextFormatGDIP.cpp +++ b/Common/Gfx/TextFormatGDIP.cpp @@ -101,13 +101,12 @@ void TextFormatGDIP::SetTrimming(bool trim) if (trim) { m_StringFormat.SetTrimming(Gdiplus::StringTrimmingEllipsisCharacter); - m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces); + m_StringFormat.SetFormatFlags(0x0); } else { m_StringFormat.SetTrimming(Gdiplus::StringTrimmingNone); - m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsMeasureTrailingSpaces | - Gdiplus::StringFormatFlagsNoClip | Gdiplus::StringFormatFlagsNoWrap); + m_StringFormat.SetFormatFlags(Gdiplus::StringFormatFlagsNoClip | Gdiplus::StringFormatFlagsNoWrap); } }