Skip to content
Permalink
Browse files

Fix for #7398, allow alpha value change in line pattern fill color pi…

…cker

- Add alpha picker and render support for: line pattern fill, line decoration symbol, font marker symbol
  • Loading branch information
dakcarto committed Mar 21, 2013
1 parent 03392c9 commit 1cecf8ee08611d5abe3a68bb6f6de41c0b9ffe17
@@ -937,7 +937,7 @@ QString QgsLineDecorationSymbolLayerV2::layerType() const
void QgsLineDecorationSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context )
{
QColor penColor = mColor;
penColor.setAlphaF( context.alpha() );
penColor.setAlphaF( mColor.alphaF() * context.alpha() );

double width = mWidth * QgsSymbolLayerV2Utils::lineWidthScaleFactor( context.renderContext(), mWidthUnit );
mPen.setWidth( context.outputLineWidth( width ) );
@@ -979,7 +979,7 @@ void QgsFontMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2R
{
QPainter* p = context.renderContext().painter();
QColor penColor = context.selected() ? context.selectionColor() : mColor;
penColor.setAlphaF( context.alpha() );
penColor.setAlphaF( mColor.alphaF() * context.alpha() );
p->setPen( penColor );
p->setFont( mFont );

@@ -967,6 +967,7 @@ void QgsLineDecorationSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* lay

// set values
btnChangeColor->setColor( mLayer->color() );
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
spinWidth->setValue( mLayer->width() );

mWidthUnitComboBox->blockSignals( true );
@@ -1245,6 +1246,7 @@ void QgsLinePatternFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* laye
mLineWidthSpinBox->setValue( mLayer->lineWidth() );
mOffsetSpinBox->setValue( mLayer->offset() );
mColorPushButton->setColor( mLayer->color() );
mColorPushButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );

//units
mDistanceUnitComboBox->blockSignals( true );
@@ -1485,6 +1487,7 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
cboFont->setCurrentFont( QFont( mLayer->fontFamily() ) );
spinSize->setValue( mLayer->size() );
btnColor->setColor( mLayer->color() );
btnColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
spinAngle->setValue( mLayer->angle() );

//block

0 comments on commit 1cecf8e

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