Skip to content

Commit

Permalink
[color button] add colour wheel to right click menu
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 18, 2016
1 parent dc9b56e commit 773212b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/qgscolorbuttonv2.cpp
Expand Up @@ -408,6 +408,15 @@ void QgsColorButtonV2::prepareMenu()
connect( noColorAction, SIGNAL( triggered() ), this, SLOT( setToNoColor() ) );
}

mMenu->addSeparator();
QgsColorWheel* colorWheel = new QgsColorWheel( mMenu );
colorWheel->setColor( color() );
QgsColorWidgetAction* colorAction = new QgsColorWidgetAction( colorWheel, mMenu, mMenu );
colorAction->setDismissOnColorSelection( false );
connect( colorAction, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
mMenu->addAction( colorAction );


if ( mColorSchemeRegistry )
{
//get schemes with ShowInColorButtonMenu flag set
Expand Down

0 comments on commit 773212b

Please sign in to comment.