]> git.saurik.com Git - wxWidgets.git/commitdiff
don't draw edge around the bitmap for pseudo owner-drawn items, this doesn't look...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Jun 2005 20:15:48 +0000 (20:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Jun 2005 20:15:48 +0000 (20:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/ownerdrw.cpp

index 8cf2357171bb3e46c2a20a70b968d374ba1290de..6fa6d7734020fec7b1ff06c67091a94020db64ef 100644 (file)
@@ -312,15 +312,21 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
                              : GetSysColor(COLOR_MENUTEXT);
   }
 
-
-  // don't draw an edge around the bitmap, if background is white ...
-  DWORD menu_bg_color = GetSysColor(COLOR_MENU);
-  if (    ( GetRValue( menu_bg_color ) >= 0xf0 &&
-            GetGValue( menu_bg_color ) >= 0xf0 &&
-            GetBValue( menu_bg_color ) >= 0xf0 )
-    )
+  if ( IsOwnerDrawn() )
+  {
+    // don't draw an edge around the bitmap, if background is white ...
+    DWORD menu_bg_color = GetSysColor(COLOR_MENU);
+    if (    ( GetRValue( menu_bg_color ) >= 0xf0 &&
+              GetGValue( menu_bg_color ) >= 0xf0 &&
+              GetBValue( menu_bg_color ) >= 0xf0 )
+      )
+    {
+        draw_bitmap_edge = false;
+    }
+  }
+  else // edge doesn't look well with default Windows drawing
   {
-      draw_bitmap_edge = false;
+    draw_bitmap_edge = false;
   }