Enable selecting opacity in generic wxColourPicker
This is implmentation of the feature which is already implemented in the native wxColourPicker under wxGTK.
This commit is contained in:
@@ -330,6 +330,7 @@ All (GUI):
|
||||
- Add support for the events from multimedia keys (Jens Göpfert).
|
||||
- Allow suppressing warnings from wxImage::LoadFile().
|
||||
- Allow customizing wxRibbon highlight colours (wxBen).
|
||||
- Enable selecting opacity in generic wxColourPicker.
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
|
||||
#define wxCLRP_DEFAULT_STYLE 0
|
||||
#define wxCLRP_SHOW_LABEL 0x0008
|
||||
#define wxCLRP_SHOW_ALPHA 0x0010
|
||||
|
||||
wxEventType wxEVT_COLOURPICKER_CHANGED;
|
||||
|
||||
@@ -33,6 +34,9 @@ wxEventType wxEVT_COLOURPICKER_CHANGED;
|
||||
@style{wxCLRP_SHOW_LABEL}
|
||||
Shows the colour in HTML form (AABBCC) as colour button label
|
||||
(instead of no label at all).
|
||||
@style{wxCLRP_SHOW_ALPHA}
|
||||
Allows to select opacity in the colour-chooser (effective under
|
||||
wxGTK and wxOSX).
|
||||
@endStyleTable
|
||||
|
||||
@beginEventEmissionTable{wxColourPickerEvent}
|
||||
|
@@ -64,6 +64,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
|
||||
m_colour = col;
|
||||
UpdateColour();
|
||||
InitColourData();
|
||||
ms_data.SetChooseAlpha(style & wxCLRP_SHOW_ALPHA);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user