Navigation Menu

Skip to content

Commit

Permalink
Add aplha to colour ramp
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 17, 2013
1 parent 0711ddf commit d472a8f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
Expand Up @@ -35,6 +35,8 @@ QgsVectorGradientColorRampV2Dialog::QgsVectorGradientColorRampV2Dialog( QgsVecto
setWindowModality( Qt::WindowModal );
#endif

btnColor1->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
btnColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
connect( btnColor1, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor1( const QColor& ) ) );
connect( btnColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );

Expand Down Expand Up @@ -271,7 +273,7 @@ void QgsVectorGradientColorRampV2Dialog::stopDoubleClicked( QTreeWidgetItem* ite
}
else
{
color = QColorDialog::getColor( item->data( 0, StopColorRole ).value<QColor>(), this );
color = QColorDialog::getColor( item->data( 0, StopColorRole ).value<QColor>(), this, tr("Edit Stop Color"), QColorDialog::ShowAlphaChannel );
}
if ( !color.isValid() )
return;
Expand Down Expand Up @@ -318,7 +320,7 @@ void QgsVectorGradientColorRampV2Dialog::addStop()
// but not needed at this time because of the other Qt bug
// FIXME need to also check max QT_VERSION when Qt bug(s) fixed
#ifndef Q_WS_MAC
QColor color = QColorDialog::getColor( QColor(), this );
QColor color = QColorDialog::getColor( QColor(), this, tr("Add Color Stop"), QColorDialog::ShowAlphaChannel );

if ( !color.isValid() )
return;
Expand Down Expand Up @@ -349,7 +351,7 @@ void QgsVectorGradientColorRampV2Dialog::addStop()
lst << "." << QString(( val < 10 ) ? '0' + QString::number( val ) : QString::number( val ) );

#ifdef Q_WS_MAC
QColor color = QColorDialog::getColor( QColor(), this );
QColor color = QColorDialog::getColor( QColor(), this, tr("Add Color Stop"), QColorDialog::ShowAlphaChannel );

if ( !color.isValid() )
return;
Expand Down

0 comments on commit d472a8f

Please sign in to comment.