fix for gtk swapped colors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott
2003-09-22 09:44:57 +00:00
parent 7993dbdd97
commit 68cbf3f89f
2 changed files with 22 additions and 0 deletions

View File

@@ -252,6 +252,17 @@ wxCursor::wxCursor( const wxImage & image )
(unsigned char)(colNextMostFreq >> 8),
(unsigned char)(colNextMostFreq) );
int fg_intensity = fg.Red() + fg.Green() + fg.Blue();
int bg_intensity = bg.Red() + bg.Green() + bg.Blue();
if (bg_intensity > fg_intensity)
{
//swap fg and bg
wxColour tmp = fg;
fg = bg;
bg = tmp;
}
int hotSpotX;
int hotSpotY;

View File

@@ -252,6 +252,17 @@ wxCursor::wxCursor( const wxImage & image )
(unsigned char)(colNextMostFreq >> 8),
(unsigned char)(colNextMostFreq) );
int fg_intensity = fg.Red() + fg.Green() + fg.Blue();
int bg_intensity = bg.Red() + bg.Green() + bg.Blue();
if (bg_intensity > fg_intensity)
{
//swap fg and bg
wxColour tmp = fg;
fg = bg;
bg = tmp;
}
int hotSpotX;
int hotSpotY;