[Wine-patches] eterbug6882: user32: Wrong indentation of text in the popup menu CodeMaster-ARM

Roman Dadkov romand на etersoft.ru
Пт Апр 15 19:48:05 MSD 2011


 eterbug6882: user32: Wrong indentation of text in the popup menu 
 CodeMaster-ARM
----------- следующая часть -----------
From f63f8695cd1097703c6c089203649d7278252211 Mon Sep 17 00:00:00 2001
From: Roman Dadkov <cunning на etersoft.ru>
Date: Fri, 15 Apr 2011 19:45:08 +0400
Subject: [PATCH] eterbug6882: user32: Wrong indentation of text in the popup
 menu CodeMaster-ARM

---
 dlls/user32/menu.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index e723983..767eebb 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -1693,6 +1693,20 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
                 rect.left += menucharsize.cx;
             rect.right -= menucharsize.cx;
 	}
+        else{
+            MENUITEM *item = menu->items;
+            UINT u;
+            int ItemShift = menucharsize.cx;
+            for (u = menu->nItems; u > 0; u--, item++)
+                if (item->hbmpItem)
+                        if (ItemShift <= item->bmpsize.cx)
+                                ItemShift = item->bmpsize.cx;
+            if (lpitem->hbmpItem)
+                 rect.left = lpitem->bmpsize.cx + menucharsize.cx;
+            if (lpitem->hbmpItem != HBMMENU_CALLBACK)
+                 rect.left = ItemShift + menucharsize.cx;
+             rect.right -= menucharsize.cx;
+        }
 
 	for (i = 0; lpitem->text[i]; i++)
 	    if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
-- 
1.7.4.4


Подробная информация о списке рассылки Wine-patches