Realize remap code cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell 2005-11-23 08:01:47 +00:00
parent 370d2fd7cc
commit bb86baea10

View File

@ -554,21 +554,18 @@ bool wxToolBar::Realize()
const bool isVertical = HasFlag(wxTB_VERTICAL);
bool doRemap, doRemapBg, doTransparent;
#ifdef __WXWINCE__
doRemapBg = false;
doRemap = false;
doTransparent = false;
#else
if (wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 2)
doRemapBg = doRemap = doTransparent = false;
#ifndef __WXWINCE__
int remapValue = (-1);
if (wxSystemOptions::HasOption(wxT("msw.remap")))
remapValue = wxSystemOptions::GetOptionInt(wxT("msw.remap"));
doTransparent = (remapValue == 2);
if (!doTransparent)
{
doRemapBg = doRemap = false;
doTransparent = true;
}
else
{ doRemap = !wxSystemOptions::HasOption(wxT("msw.remap"))
|| wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 1;
doRemap = (remapValue != 0);
doRemapBg = !doRemap;
doTransparent = false;
}
#endif
@ -611,6 +608,7 @@ bool wxToolBar::Realize()
wxMemoryDC dcAllButtons;
wxBitmap bitmap(totalBitmapWidth, totalBitmapHeight);
dcAllButtons.SelectObject(bitmap);
#ifdef __WXWINCE__
dcAllButtons.SetBackground(wxBrush(wxColour(192,192,192)));
#else
@ -822,7 +820,6 @@ bool wxToolBar::Realize()
continue;
}
TBBUTTON& button = buttons[i];
wxZeroMemory(button);