Hugh McMaster : wineconsole: Apply the selected background colour to the entire font preview dialog.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 26 10:32:52 CST 2016
Module: wine
Branch: master
Commit: 969151755afa1e3889be7652c75d79c68b441250
URL: http://source.winehq.org/git/wine.git/?a=commit;h=969151755afa1e3889be7652c75d79c68b441250
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Mon Jan 25 21:01:02 2016 +1100
wineconsole: Apply the selected background colour to the entire font preview dialog.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/wineconsole/dialog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index 4f73a3a..cae02cb 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -190,12 +190,15 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
hFont = (HFONT)GetWindowLongPtrW(hWnd, 0);
if (hFont)
{
+ COLORREF bkcolor;
WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'};
WCHAR buf[256];
int len;
hOldFont = SelectObject(ps.hdc, hFont);
- SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]);
+ bkcolor = WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)];
+ FillRect(ps.hdc, &ps.rcPaint, CreateSolidBrush(bkcolor));
+ SetBkColor(ps.hdc, bkcolor);
SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]);
len = LoadStringW(GetModuleHandleW(NULL), IDS_FNT_PREVIEW,
buf, sizeof(buf) / sizeof(buf[0]));
More information about the wine-cvs
mailing list