From d7d3309e0aed9065af19c908c91db6bedd01cf68 Mon Sep 17 00:00:00 2001
From: Rob Shearman <rob@codeweavers.com>
Date: Fri, 1 Dec 2006 15:05:38 +0000
Subject: [PATCH] ole32: The width of the metafile drawn should be 3 times the
 icon width in OleMetafilePictFromIconAndLabel.

---
 dlls/ole32/ole32_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ole32/ole32_main.c b/dlls/ole32/ole32_main.c
index 493d246432d..c15c3e8524b 100644
--- a/dlls/ole32/ole32_main.c
+++ b/dlls/ole32/ole32_main.c
@@ -91,8 +91,11 @@ HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel,
 		GetTextExtentPoint32W(hdcScreen, lpszLabel, lstrlenW(lpszLabel), &text_size);
 		SelectObject(hdcScreen, screen_old_font);
 		ReleaseDC(NULL, hdcScreen);
+
+		width = 3 * icon_width;
 	}
-	width = max(text_size.cx, icon_width);
+	else
+		width = icon_width;
 
 	SetWindowOrgEx(hdc, 0, 0, NULL);
 	SetWindowExtEx(hdc, width, label_offset + text_size.cy, NULL);