Skip to content
Permalink
Browse files

Add icons for data defined colors

  • Loading branch information
nyalldawson committed Jan 11, 2019
1 parent fd9bd0a commit 56b363ea39e0578472844b2206ee663f11895bbe
@@ -742,6 +742,8 @@
<file>themes/default/mIconFolder24.svg</file>
<file>themes/default/mActionNewFolder.svg</file>
<file>themes/default/mIconFieldBool.svg</file>
<file>themes/default/mIconDataDefineColor.svg</file>
<file>themes/default/mIconDataDefineColorOn.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="4 4 24 24" width="24"><path d="M9.5 19.892c0 .836-.284 1.193-.631.792l-3.771-4.351a1.15 1.15 0 0 1 0-1.459l3.771-4.359c.347-.402.631-.045.631.792z" fill="#939598" stroke="#4f5052"/><path d="M9.341 8.199v15.156h12.514V8.199z" fill="none"/><path d="M9.5 8.5v15h12v-15z" fill="#fff" fill-opacity=".703" stroke="#878984" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.954 11.868c-1.483 1.602-1.146-.264-.257-.906.921-.666 1.438-.649 1.431-.446-.008.238-.707.848-1.174 1.352zM12.456 17.028c-1.485 1.601-1.23.119-.34-.52.92-.663 1.437-.646 1.43-.443-.008.238-.626.462-1.09.963zM18.973 18.817c-1.432 1.598-1.322.08-.402-.509.702-.449.909-.06.402.509z" fill="#fff" opacity=".5"/><path d="M12 11h7v3h-7z" fill="#b3b3b3"/><path d="M18 11v2h-2v1h3v-3z" opacity=".156"/><path d="M19 11v2h-2v1h3v-3z" opacity=".074"/><path d="M12 14h7v4h-7z" fill="#999"/><path d="M18 14v3h-2v1h3v-4z" opacity=".156"/><path d="M19 14v3h-2v1h3v-4z" opacity=".074"/><path d="M12 18h7v3h-7z" fill="gray"/><path d="M18 18v2h-2v1h3v-3z" opacity=".156"/><path d="M19 18v2h-2v1h3v-3z" opacity=".074"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="4 4 24 24" width="24"><path d="M9.5 19.892c0 .836-.284 1.193-.631.792l-3.771-4.351a1.15 1.15 0 0 1 0-1.459l3.771-4.359c.347-.402.631-.045.631.792z" fill="#939598" stroke="#4f5052"/><path d="M9.341 8.199v15.156h12.514V8.199z" fill="#fff"/><path d="M9.5 8.5v15h12v-15z" fill="#fbf091" stroke="#c4a000" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 11h7v3h-7z" fill="#b3b3b3"/><path d="M18 11v2h-2v1h3v-3z" opacity=".156"/><path d="M19 11v2h-2v1h3v-3z" opacity=".074"/><path d="M12 14h7v4h-7z" fill="#999"/><path d="M18 14v3h-2v1h3v-4z" opacity=".156"/><path d="M19 14v3h-2v1h3v-4z" opacity=".074"/><path d="M12 18h7v3h-7z" fill="gray"/><path d="M18 18v2h-2v1h3v-3z" opacity=".156"/><path d="M19 18v2h-2v1h3v-3z" opacity=".074"/></svg>
@@ -753,6 +753,12 @@ void QgsPropertyOverrideButton::updateGui()
{
icon = mProperty.isActive() ? QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineExpressionOn.svg" ) ) : QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineExpression.svg" ) );

QRegularExpression rx( QStringLiteral( "^project_color\\('.*'\\)$" ) );
if ( rx.match( mExpressionString ).hasMatch() )
{
icon = mProperty.isActive() ? QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineColorOn.svg" ) ) : QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineColor.svg" ) );
}

QgsExpression exp( mExpressionString );
if ( exp.hasParserError() )
{

0 comments on commit 56b363e

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