https://git.reactos.org/?p=reactos.git;a=commitdiff;h=710df1361ccf3d13e4ced…
commit 710df1361ccf3d13e4ced3251ffa9ea939b53ca7
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Jan 8 19:51:42 2024 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Jan 8 19:51:42 2024 +0900
[COMCTL32] ToolTip: Expand tabs (#6315)
Based on KRosUser's tooltip_tabfix.patch.
ToolTip should expand tabs.
JIRA issue: CORE-5635, CORE-13651
- Add DT_EXPANDTABS flag for DrawText.
---
dll/win32/comctl32/tooltips.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dll/win32/comctl32/tooltips.c b/dll/win32/comctl32/tooltips.c
index 8c8ef43eb08..b0857e0b4a4 100644
--- a/dll/win32/comctl32/tooltips.c
+++ b/dll/win32/comctl32/tooltips.c
@@ -349,6 +349,9 @@ TOOLTIPS_Refresh (const TOOLTIPS_INFO *infoPtr, HDC hdc)
}
/* draw text */
+#ifdef __REACTOS__
+ uFlags |= DT_EXPANDTABS;
+#endif
DrawTextW (hdc, infoPtr->szTipText, -1, &rc, uFlags);
/* Custom draw - Call PostPaint after drawing */
@@ -562,6 +565,9 @@ TOOLTIPS_CalcTipSize (const TOOLTIPS_INFO *infoPtr, LPSIZE lpSize)
title.cx += (rcTitle.right - rcTitle.left);
}
hOldFont = SelectObject (hdc, infoPtr->hFont);
+#ifdef __REACTOS__
+ uFlags |= DT_EXPANDTABS;
+#endif
DrawTextW (hdc, infoPtr->szTipText, -1, &rc, uFlags);
SelectObject (hdc, hOldFont);
ReleaseDC (infoPtr->hwndSelf, hdc);