]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colour.cpp
Should return wxImage not bool
[wxWidgets.git] / src / gtk / colour.cpp
index 98946e16496b8df648ad934c9b019bbc5e94c615..60735789ebf5aa0454b50134af65711de57b3a2a 100644 (file)
@@ -15,8 +15,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/gdicmn.h"
 #include "wx/colour.h"
 #include "wx/colour.h"
+#include "wx/gdicmn.h"
 #include "wx/gtk/private.h"
 
 #include <gdk/gdk.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 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)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)