Do not test for obsolete OS versions to determine if it must use owner drawn item.
This commit is contained in:
@@ -1322,14 +1322,10 @@ void wxMenuItem::GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& co
|
||||
|
||||
bool wxMenuItem::MSWMustUseOwnerDrawn()
|
||||
{
|
||||
// MIIM_BITMAP only works under WinME/2000+ so we always use owner
|
||||
// drawn item under the previous versions and we also have to use
|
||||
// them in any case if the item has custom colours or font
|
||||
static const wxWinVersion winver = wxGetWinVersion();
|
||||
bool mustUseOwnerDrawn = winver < wxWinVersion_98 ||
|
||||
GetTextColour().IsOk() ||
|
||||
GetBackgroundColour().IsOk() ||
|
||||
GetFont().IsOk();
|
||||
// we have to use owner drawn item if it has custom colours or font
|
||||
bool mustUseOwnerDrawn = GetTextColour().IsOk() ||
|
||||
GetBackgroundColour().IsOk() ||
|
||||
GetFont().IsOk();
|
||||
|
||||
// Windows XP or earlier don't display menu bitmaps bigger than
|
||||
// standard size correctly (they're truncated) nor can
|
||||
@@ -1338,6 +1334,7 @@ bool wxMenuItem::MSWMustUseOwnerDrawn()
|
||||
// doesn't seem to have any problems with even very large bitmaps
|
||||
// so don't use owner-drawn items unnecessarily there (Vista wasn't
|
||||
// actually tested but I assume it works as 7 rather than as XP).
|
||||
static const wxWinVersion winver = wxGetWinVersion();
|
||||
if ( !mustUseOwnerDrawn && winver < wxWinVersion_Vista )
|
||||
{
|
||||
const wxBitmap& bmpUnchecked = GetBitmap(false),
|
||||
|
Reference in New Issue
Block a user