Restore xw2.6 compatibility, thanks to Raúl Sánchez Siles for patch.

This commit is contained in:
raburton 2008-04-14 18:42:33 +00:00
parent b0e906abba
commit 7bb6007a67
1 changed files with 6 additions and 4 deletions

View File

@ -129,17 +129,19 @@ StructColors ColorRefs[NBCOLOR] =
*/ */
static inline wxColour MakeColour( int aColor ) static inline wxColour MakeColour( int aColor )
{ {
#if wxCHECK_VERSION(2,8,5)
int alpha = GetAlpha( aColor ); int alpha = GetAlpha( aColor );
alpha = alpha ? alpha : wxALPHA_OPAQUE; alpha = alpha ? alpha : wxALPHA_OPAQUE;
#endif
int ndx = aColor & MASKCOLOR; int ndx = aColor & MASKCOLOR;
return wxColour( return wxColour(
ColorRefs[ndx].m_Red, ColorRefs[ndx].m_Red,
ColorRefs[ndx].m_Green, ColorRefs[ndx].m_Green,
ColorRefs[ndx].m_Blue, ColorRefs[ndx].m_Blue
(unsigned char) alpha #if wxCHECK_VERSION(2,8,5)
,(unsigned char) alpha
#endif
); );
} }