mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[color button] add colour wheel to right click menu
This commit is contained in:
parent
dc9b56e2c1
commit
773212b241
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user