Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fine transparency settings for vectors. #258

Merged
merged 1 commit into from
Oct 1, 2012

Conversation

rugginoso
Copy link
Contributor

Now the user can specify the alpha channel for outlines, border and
fill colors of polygons and markers.
The overall layer alpha channel is used as multiplier for these
values.
Selections are not affected.

Work done for Regione Toscana-SITA.

Now the user can specify the alpha channel for outlines, border and
fill colors of polygons and markers.
The overall layer alpha channel is used as multiplier for these
values.
Selections are not affected.

Work done for Regione Toscana-SITA.
@rugginoso
Copy link
Contributor Author

Should fix http://hub.qgis.org/issues/5276

@@ -259,9 +259,9 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setColorBorder()
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor borderColor = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog );
QColor borderColor = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why QColorDialog::DontUseNativeDialog is removed when there is a note to saying it should be used?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why QColorDialog::DontUseNativeDialog is removed when there is a note to saying it should be used?

Where? AFAICS it wasn't removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry misread. Never mind.

@ghost ghost assigned brushtyler Oct 1, 2012
@brushtyler
Copy link
Contributor

Along to this commit, I have to push the following one: brushtyler@d79fd27.

The problem is due to the current QgsFillSymbolLayerV2 implementation (the one before applying this patch), which changes the mColor.alpha value every time the symbol layer is rendered by calling mColor.setAlphaF( context.alpha() );.
When the symbol layer is saved to the QML the transparency value is stored twice.

Also see http://osgeo-org.1560.n6.nabble.com/Symbol-transparency-wrong-value-stored-and-displayed-td4997207.html

@nirvn
Copy link
Contributor

nirvn commented Oct 1, 2012

Yay, been waiting for this one a long time :)

@brushtyler brushtyler merged commit 74ba70a into qgis:master Oct 1, 2012
@brushtyler
Copy link
Contributor

Thanks Lorenzo (aka rugginoso)!

yjacolin added a commit to yjacolin/QGIS that referenced this pull request Oct 4, 2014
Explain live update of the color button for print composer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants