The toolbar background for some colour schemes cannot be determined
(for example Silver). So set an explicit background colour to avoid parts of the background being painted wrongly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -265,6 +265,15 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size)
|
||||
// toolbar-specific post initialisation
|
||||
::SendMessage(GetHwnd(), TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||
|
||||
// The toolbar background for some colour schemes cannot be determined
|
||||
// (for example Silver). So set an explicit background colour to avoid parts of
|
||||
// the background being painted wrongly.
|
||||
|
||||
int majorVersion, minorVersion;
|
||||
wxGetOsVersion(& majorVersion, & minorVersion);
|
||||
if (majorVersion < 6)
|
||||
SetBackgroundColour(GetBackgroundColour());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -371,7 +380,7 @@ wxSize wxToolBar::DoGetBestSize() const
|
||||
if (!(GetWindowStyle() & wxTB_NODIVIDER))
|
||||
sizeBest.y += 2;
|
||||
sizeBest.y ++;
|
||||
}
|
||||
}
|
||||
|
||||
CacheBestSize(sizeBest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user