From 78cb66ff3f17f3f5e3907da8792b8c44bc5fbc3d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Feb 2016 19:30:56 +0100 Subject: [PATCH] Disable use of opacity in wxGenericColourDialog for non-MSW/OSX The other ports don't have wxBitmap::{Use,Has}Alpha() (see #17397), so currently the code doesn't compile under them. Closes #17393. --- include/wx/generic/colrdlgg.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h index b6bfa86143..10657529ed 100644 --- a/include/wx/generic/colrdlgg.h +++ b/include/wx/generic/colrdlgg.h @@ -18,9 +18,12 @@ class WXDLLIMPEXP_FWD_CORE wxSlider; #endif // wxUSE_SLIDER -// Preview with opacity is possible only -// if wxGCDC and wxStaticBitmap are available. -#define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA (wxUSE_GRAPHICS_CONTEXT && wxUSE_STATBMP) +// Preview with opacity is possible only if wxGCDC and wxStaticBitmap are +// available and currently it only works in wxOSX and wxMSW as it uses wxBitmap +// UseAlpha() and HasAlpha() methods which only these ports provide. +#define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA \ + ((wxUSE_GRAPHICS_CONTEXT && wxUSE_STATBMP) && \ + (defined(__WXMSW__) || defined(__WXOSX__))) #if wxCLRDLGG_USE_PREVIEW_WITH_ALPHA class wxStaticBitmap;