From 9b0c3070a838d8e241b1f9db13a62f19305ff816 Mon Sep 17 00:00:00 2001 From: Dmitriy Trifonov Date: Mon, 31 Jan 2022 17:14:15 +0700 Subject: [PATCH] Fixed issue #3854: Ampersand in branch label underlines next character Signed-off-by: Dmitriy Trifonov Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/GitLogListBase.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index e46b5dabd..18388f42f 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -63,6 +63,7 @@ Released: unreleased * Fixed issue #3846: ScanFile hangs commit dialog (fixed regex backtracking) * Fixed issue #3848: "Git Sync..." > "Compare tags" does not properly clear state from previous actions * Fixed issue #3849: TortoiseGitMerge cannot drag mouse to select last character of wrapped line + * Fixed issue #3854: Ampersand in branch label underlines next character = Release 2.12.0 = Released: 2021-03-31 diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 4581bf670..be1334dbb 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -692,7 +692,7 @@ void CGitLogListBase::DrawTagBranch(HDC hdc, CDC& W_Dc, HTHEME hTheme, const CRe opts.dwSize = sizeof(opts); opts.crText = GetSysColor(COLOR_WINDOWTEXT); opts.dwFlags = DTT_TEXTCOLOR; - DrawThemeTextEx(hTheme, hdc, LVP_LISTITEM, txtState, shortname, -1, textpos | DT_SINGLELINE | DT_VCENTER, &textRect, &opts); + DrawThemeTextEx(hTheme, hdc, LVP_LISTITEM, txtState, shortname, -1, textpos | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER, &textRect, &opts); } else { @@ -701,13 +701,13 @@ void CGitLogListBase::DrawTagBranch(HDC hdc, CDC& W_Dc, HTHEME hTheme, const CRe { COLORREF clrNew = ::GetSysColor(COLOR_HIGHLIGHTTEXT); COLORREF clrOld = ::SetTextColor(hdc,clrNew); - ::DrawText(hdc, shortname, shortname.GetLength(), &textRect, textpos | DT_SINGLELINE | DT_VCENTER); + ::DrawText(hdc, shortname, shortname.GetLength(), &textRect, textpos | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); ::SetTextColor(hdc,clrOld); } else { COLORREF clrOld = ::SetTextColor(hdc, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT)); - ::DrawText(hdc, shortname, shortname.GetLength(), &textRect, textpos | DT_SINGLELINE | DT_VCENTER); + ::DrawText(hdc, shortname, shortname.GetLength(), &textRect, textpos | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); ::SetTextColor(hdc, clrOld); } } -- 2.11.4.GIT