Module: wine Branch: master Commit: 19a7037d502e765d448032383f5770d7b2621eb2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=19a7037d502e765d448032383f...
Author: Alexandre Julliard julliard@winehq.org Date: Fri May 27 21:15:12 2016 +0900
explorer: Use the window caption font for the Start button.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/explorer/systray.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 4f94ba6..40e03e9 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -549,14 +549,21 @@ static void do_hide_systray(void) static void do_show_systray(void) { SIZE start_button_size; + NONCLIENTMETRICSW ncm; + HFONT font; HDC hdc = GetDC( 0 );
+ ncm.cbSize = sizeof(NONCLIENTMETRICSW); + SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &ncm, 0 ); + font = CreateFontIndirectW( &ncm.lfCaptionFont ); /* FIXME: Implement BCM_GETIDEALSIZE and use that instead. */ + SelectObject( hdc, font ); GetTextExtentPointW( hdc, start_label, lstrlenW(start_label), &start_button_size ); /* add some margins (FIXME) */ start_button_size.cx += 8; start_button_size.cy += 4; ReleaseDC( 0, hdc ); + SendMessageW( start_button, WM_SETFONT, (WPARAM)font, 0 );
tray_width = GetSystemMetrics( SM_CXSCREEN ); tray_height = max( icon_cy, start_button_size.cy );