Skip to content

Commit d472a8f

Browse files
committed
Add aplha to colour ramp
1 parent 0711ddf commit d472a8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ QgsVectorGradientColorRampV2Dialog::QgsVectorGradientColorRampV2Dialog( QgsVecto
3535
setWindowModality( Qt::WindowModal );
3636
#endif
3737

38+
btnColor1->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
39+
btnColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
3840
connect( btnColor1, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor1( const QColor& ) ) );
3941
connect( btnColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );
4042

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

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

351353
#ifdef Q_WS_MAC
352-
QColor color = QColorDialog::getColor( QColor(), this );
354+
QColor color = QColorDialog::getColor( QColor(), this, tr("Add Color Stop"), QColorDialog::ShowAlphaChannel );
353355

354356
if ( !color.isValid() )
355357
return;

0 commit comments

Comments
 (0)