[PATCH 0/1] MR9435: comctl32/ipaddress: Use the system window text color to draw dots.
Manual tests on XP show that ipaddress controls don't use the text colors in the theme file to draw dots and the system window text color should be used instead. In fact, there is no text color property for the ETS_NORMAL state in the theme file. This fixes the wrong color for the dots in ipaddress controls. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9435
From: Zhiyi Zhang <zzhang(a)codeweavers.com> Manual tests on XP show that ipaddress controls don't use the text colors in the theme file to draw dots and the system window text color should be used instead. In fact, there is no text color property for the ETS_NORMAL state in the theme file. This fixes the wrong color for the dots in ipaddress controls. --- dlls/comctl32/ipaddress.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 6931574787c..4e194af1c57 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -147,18 +147,6 @@ static int IPADDRESS_GetThemeTextState (const IPADDRESS_INFO *infoPtr) static void IPADDRESS_GetTextColors (const IPADDRESS_INFO *infoPtr, COLORREF *background_color, COLORREF *foreground_color) { -#if __WINE_COMCTL32_VERSION == 6 - HTHEME theme = GetWindowTheme(infoPtr->Self); - - if (theme) - { - int state = IPADDRESS_GetThemeTextState(infoPtr); - GetThemeColor(theme, EP_EDITTEXT, state, TMT_FILLCOLOR, background_color); - GetThemeColor(theme, EP_EDITTEXT, state, TMT_TEXTCOLOR, foreground_color); - return; - } -#endif - if (infoPtr->Enabled) { *background_color = comctl32_color.clrWindow; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9435
This looks good now, thanks. The only remaining cosmetic issue I can see now is that dots are not aligned with numbers. On Windows they look snapped to the same baseline, on Wine numbers' baseline is clearly a bit higher. Since those should be using the same font, it's probably not hard to improve. Just a note for, I don't think we need to spend time on it now. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9435#note_121626
This merge request was approved by Nikolay Sivov. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9435
On Wed Nov 12 09:43:36 2025 +0000, Nikolay Sivov wrote:
This looks good now, thanks. The only remaining cosmetic issue I can see now is that dots are not aligned with numbers. On Windows they look snapped to the same baseline, on Wine numbers' baseline is clearly a bit higher. Since those should be using the same font, it's probably not hard to improve. Just a note for, I don't think we need to spend time on it now. Yeah, I also noticed that and didn't want to spend time on it. IPADDRESS_Create() set ANSI_VAR_FONT for the edit controls for the numbers. That's probably why it's not aligned.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9435#note_121629
participants (3)
-
Nikolay Sivov (@nsivov) -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)