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
This commit is contained in:
Vadim Zeitlin
2005-06-07 20:15:48 +00:00
parent 783e2cc648
commit 39dcd5151a

View 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() )
{
draw_bitmap_edge = false;
// 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;
}