]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
made more clear that GetItemRect() returns physical coords
[wxWidgets.git] / src / gtk1 / colour.cpp
index 98946e16496b8df648ad934c9b019bbc5e94c615..60735789ebf5aa0454b50134af65711de57b3a2a 100644 (file)
@@ -15,8 +15,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/gdicmn.h"
 #include "wx/colour.h"
+#include "wx/gdicmn.h"
 #include "wx/gtk/private.h"
 
 #include <gdk/gdk.h>
@@ -146,7 +146,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
 
 #define M_COLDATA ((wxColourRefData *)m_refData)
 
-#define SHIFT (8*(sizeof(short int)-sizeof(char)))
+// GDK's values are in 0..65535 range, our are in 0..255
+#define SHIFT  8
 
 IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)