From: Vadim Zeitlin Date: Tue, 7 Jun 2005 20:15:48 +0000 (+0000) Subject: don't draw edge around the bitmap for pseudo owner-drawn items, this doesn't look... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/39dcd5151a786f12e322010a98cff57c05f7e420 don't draw edge around the bitmap for pseudo owner-drawn items, this doesn't look well git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index 8cf2357171..6fa6d77340 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -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; }