Changeset 1097


Ignore:
Timestamp:
6/3/2009 2:41:24 AM (6 years ago)
Author:
lowjoel
Message:

Do not paint partially transparent backgrounds for all parts (only the main menu item part needs to be checked)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser.Util/UxThemeApi.cs

    r1071 r1097  
    142142 
    143143            if (NativeMethods.IsThemeBackgroundPartiallyTransparent(hTheme, 
    144                 (int)NativeMethods.MENUPARTS.MENU_POPUPBACKGROUND, 0)) 
    145             { 
    146                 NativeMethods.DrawThemeParentBackground(control.Handle, hDC, ref rect); 
    147             } 
    148             NativeMethods.DrawThemeBackground(hTheme, hDC, 
    149                 (int)NativeMethods.MENUPARTS.MENU_POPUPBACKGROUND, 0, ref rect, ref rect); 
    150  
    151             if (NativeMethods.IsThemeBackgroundPartiallyTransparent(hTheme, 
    152                 (int)NativeMethods.MENUPARTS.MENU_POPUPBORDERS, 0)) 
    153             { 
    154                 NativeMethods.DrawThemeParentBackground(control.Handle, hDC, ref rect); 
    155             } 
     144                (int)NativeMethods.MENUPARTS.MENU_POPUPITEM, 0)) 
     145            { 
     146                NativeMethods.DrawThemeBackground(hTheme, hDC, 
     147                    (int)NativeMethods.MENUPARTS.MENU_POPUPBACKGROUND, 0, ref rect, ref rect); 
     148            } 
     149             
    156150            NativeMethods.DrawThemeBackground(hTheme, hDC, (int) 
    157151                NativeMethods.MENUPARTS.MENU_POPUPBORDERS, 0, ref rect, ref rect); 
     
    168162            rect.Offset(1, 0); 
    169163 
    170             if (NativeMethods.IsThemeBackgroundPartiallyTransparent(hTheme, 
    171                 (int)NativeMethods.MENUPARTS.MENU_POPUPGUTTER, 0)) 
    172             { 
    173                 NativeMethods.DrawThemeParentBackground(control.Handle, hDC, ref rect); 
    174             } 
    175164            NativeMethods.DrawThemeBackground(hTheme, hDC, 
    176165                (int)NativeMethods.MENUPARTS.MENU_POPUPGUTTER, 0, ref rect, ref rect); 
     
    234223                (item.Enabled ? NativeMethods.POPUPCHECKSTATES.MC_CHECKMARKNORMAL : 
    235224                    NativeMethods.POPUPCHECKSTATES.MC_CHECKMARKDISABLED) : 0); 
    236             if (NativeMethods.IsThemeBackgroundPartiallyTransparent(hTheme, 
    237                 (int)NativeMethods.MENUPARTS.MENU_POPUPCHECK, checkState)) 
    238             { 
    239                 NativeMethods.DrawThemeParentBackground(control.Handle, hDC, ref imgRect); 
    240             } 
    241225            NativeMethods.DrawThemeBackground(hTheme, hDC, 
    242226                (int)NativeMethods.MENUPARTS.MENU_POPUPCHECK, checkState, 
Note: See TracChangeset for help on using the changeset viewer.