use transparent icons and clear the DC before drawing them to fix the background of state icons appearance (part of #9591)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,7 +14,7 @@ static const char *state1_xpm[] = {
|
||||
"6. c #A6A800",
|
||||
"M c #EDF00E",
|
||||
"$. c #A6A802",
|
||||
" c #FFFFFF",
|
||||
" c None",
|
||||
"H c #DEE104",
|
||||
"0 c #F5F802",
|
||||
"o c #FCFF22",
|
||||
|
@@ -13,7 +13,7 @@ static const char *state2_xpm[] = {
|
||||
"' c #3F8620",
|
||||
"x c #9FD488",
|
||||
"6. c #37751C",
|
||||
" c #FFFFFF",
|
||||
" c None",
|
||||
"A c #8CCB71",
|
||||
"# c #98D07F",
|
||||
"5. c #3A7C1E",
|
||||
|
@@ -17,7 +17,7 @@ static const char *state3_xpm[] = {
|
||||
"0 c #C62B2B",
|
||||
"$ c #DF7A7A",
|
||||
"t c #D14949",
|
||||
" c #FFFFFF",
|
||||
" c None",
|
||||
"o. c #962020",
|
||||
"&. c #B82C2C",
|
||||
"p c #E8A1A1",
|
||||
|
@@ -12,7 +12,7 @@ static const char *state4_xpm[] = {
|
||||
"=. c #2C67B8",
|
||||
"| c #2760AD",
|
||||
".. c #3672C5",
|
||||
" c #FFFFFF",
|
||||
" c None",
|
||||
"U c #548AD4",
|
||||
"s c #2A6AC1",
|
||||
"% c #3475CD",
|
||||
|
@@ -7,7 +7,7 @@ static const char *state5_xpm[] = {
|
||||
"O c #3C3C3C",
|
||||
"l c #080808",
|
||||
"w c #353535",
|
||||
" c #FFFFFF",
|
||||
" c None",
|
||||
"u c #010101",
|
||||
"C c #101010",
|
||||
"< c #1F1F1F",
|
||||
|
@@ -925,21 +925,15 @@ void MyTreeCtrl::CreateStateImageList(bool del)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
int width = ::GetSystemMetrics(SM_CXMENUCHECK),
|
||||
height = ::GetSystemMetrics(SM_CYMENUCHECK);
|
||||
#else
|
||||
int width = 16;
|
||||
int height = 16;
|
||||
#endif
|
||||
wxRendererNative& renderer = wxRendererNative::Get();
|
||||
|
||||
wxSize size(renderer.GetCheckBoxSize(this));
|
||||
|
||||
// make an state checkbox image list
|
||||
states = new wxImageList(width, height, true);
|
||||
states = new wxImageList(size.GetWidth(), size.GetHeight(), true);
|
||||
|
||||
wxBitmap checkBmp(width, height);
|
||||
wxRect rect (0, 0, width, height);
|
||||
|
||||
wxRendererNative& renderer = wxRendererNative::Get();
|
||||
wxBitmap checkBmp(size.GetWidth(), size.GetHeight());
|
||||
wxRect rect(size);
|
||||
|
||||
// create no checked image
|
||||
{
|
||||
@@ -955,6 +949,7 @@ void MyTreeCtrl::CreateStateImageList(bool del)
|
||||
// create checked image
|
||||
{
|
||||
wxMemoryDC memDC(checkBmp);
|
||||
memDC.Clear();
|
||||
renderer.DrawCheckBox(this, memDC, rect, wxCONTROL_CHECKED);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user