Minor enhancement in color selection on Windows

This commit is contained in:
jean-pierre charras 2017-06-23 09:00:23 +02:00
parent 5d8dd7c20f
commit 0719b99ad8
2 changed files with 6 additions and 1 deletions

View File

@ -152,6 +152,9 @@ void COLOR_SWATCH::GetNewSwatchColor()
{
wxColourData colourData;
colourData.SetColour( m_color.ToColour() );
// Has effect only on Windows: shows the full color dialog
colourData.SetChooseFull(true);
wxColourDialog dialog( this, &colourData );
if( dialog.ShowModal() == wxID_OK )

View File

@ -45,6 +45,8 @@ public:
* @param aParent parent window
* @param aColor initial swatch color
* @param aID id to use when sending swatch events
* @param aArbitraryColors true to allow selection of any 32 bits color for GAL canvas,
* and false to allow a selection from a set of colors accepted by the legacy canvas.
*/
COLOR_SWATCH( wxWindow* aParent, KIGFX::COLOR4D aColor, int aID,
bool aArbitraryColors );
@ -73,7 +75,7 @@ private:
*/
void rePostEvent( wxEvent& aEvt );
///> Can the swatch have any color, or only preset ones?
///> Can the swatch have any color, or only preset ones for legacy canvas?
bool m_arbitraryColors;
///> The current colour of the swatch