https://git.reactos.org/?p=reactos.git;a=commitdiff;h=413d7226289445c3d6ab6…
commit 413d7226289445c3d6ab62f7ec9d43ee8d459749
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat May 9 15:32:15 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat May 9 15:32:15 2020 +0900
Revert "Revert "[COMCTL32][USER32] Fix radio button regression (#2146)"
(#2753)" (#2758)
This reverts commit 66b0a48a75d41fbc047d63df9b561e2c80626376.
---
dll/win32/comctl32/button.c | 4 ++++
win32ss/user/user32/controls/button.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c
index 37dab409b0d..db207499e67 100644
--- a/dll/win32/comctl32/button.c
+++ b/dll/win32/comctl32/button.c
@@ -1211,7 +1211,11 @@ static UINT BUTTON_CalcLabelRect(const BUTTON_INFO *infoPtr, HDC
hdc, RECT *rc)
}
if ((hFont = infoPtr->font)) hPrevFont = SelectObject( hdc, hFont );
+#ifdef __REACTOS__
+ DrawTextW(hdc, text, -1, &r, ((dtStyle | DT_CALCRECT) & ~(DT_VCENTER |
DT_BOTTOM)));
+#else
DrawTextW(hdc, text, -1, &r, dtStyle | DT_CALCRECT);
+#endif
if (hPrevFont) SelectObject( hdc, hPrevFont );
heap_free( text );
#ifdef __REACTOS__
diff --git a/win32ss/user/user32/controls/button.c
b/win32ss/user/user32/controls/button.c
index df7fb0e7810..6b65c536795 100644
--- a/win32ss/user/user32/controls/button.c
+++ b/win32ss/user/user32/controls/button.c
@@ -773,7 +773,11 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
}
if ((hFont = get_button_font( hwnd ))) hPrevFont = SelectObject( hdc, hFont );
+#ifdef __REACTOS__
+ DrawTextW(hdc, text, -1, &r, ((dtStyle | DT_CALCRECT) & ~(DT_VCENTER |
DT_BOTTOM)));
+#else
DrawTextW(hdc, text, -1, &r, dtStyle | DT_CALCRECT);
+#endif
if (hPrevFont) SelectObject( hdc, hPrevFont );
HeapFree( GetProcessHeap(), 0, text );
#ifdef __REACTOS__