Allow turning on/off opacity selector in wxColourDialog (wxOSX)

This feature to show/hide alpha values and opacity selector (slider) is
already implemented under wxGTK and for generic wxColourDialog.
For the sake of backward compatibility, this feature is enabled here by
default (through the corresponding property of wxColourData).
This commit is contained in:
Artur Wieczorek
2017-07-03 21:13:49 +02:00
parent 294436c8bb
commit a29815e19a
4 changed files with 29 additions and 1 deletions

View File

@@ -25,7 +25,14 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject);
wxColourData::wxColourData()
{
m_chooseFull = false;
#ifdef __WXOSX__
// Under OSX, legacy wxColourDialog had opacity selector
// (slider) always enabled, so for backward compatibilty
// we should tell the dialog to enable it by default.
m_chooseAlpha = true;
#else
m_chooseAlpha = false;
#endif // __WXOSX__ / !__WXOSX__
m_dataColour.Set(0,0,0);
// m_custColours are wxNullColours initially
}