Skip to content
Permalink
Browse files

Add aplha to colour ramp

  • Loading branch information
NathanW2 committed May 17, 2013
1 parent 0711ddf commit d472a8f4aa2214267c0b1dc743218f12f0bc3de0
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
@@ -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& ) ) );

@@ -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;
@@ -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;
@@ -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;

0 comments on commit d472a8f

Please sign in to comment.
You can’t perform that action at this time.