Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Disable label shadow frame by default
  • Loading branch information
DelazJ committed Oct 5, 2019
1 parent 1981899 commit bdaff62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/gui/qgstextformatwidget.cpp
Expand Up @@ -482,6 +482,11 @@ void QgsTextFormatWidget::initWidget()
{
updateShapeFrameStatus();
} );
connect( mShadowDrawDDBtn, &QgsPropertyOverrideButton::activated, this, &QgsTextFormatWidget::updateShadowFrameStatus );
connect( mShadowDrawChkBx, &QCheckBox::stateChanged, [ = ]( int )
{
updateShadowFrameStatus();
} );

mGeometryGeneratorType->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconPolygonLayer.svg" ) ), tr( "Polygon / MultiPolygon" ), QgsWkbTypes::GeometryType::PolygonGeometry );
mGeometryGeneratorType->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconLineLayer.svg" ) ), tr( "LineString / MultiLineString" ), QgsWkbTypes::GeometryType::LineGeometry );
Expand Down Expand Up @@ -855,7 +860,7 @@ void QgsTextFormatWidget::updateWidgetForFormat( const QgsTextFormat &format )

// shape background
mShapeDrawChkBx->setChecked( background.enabled() );
mShapeFrame->setEnabled( background.enabled() || mBufferDrawDDBtn->isActive() );
mShapeFrame->setEnabled( background.enabled() );
mShapeTypeCmbBx->blockSignals( true );
mShapeTypeCmbBx->setCurrentIndex( mShapeTypeCmbBx->findData( background.type() ) );
mShapeTypeCmbBx->blockSignals( false );
Expand Down Expand Up @@ -906,6 +911,7 @@ void QgsTextFormatWidget::updateWidgetForFormat( const QgsTextFormat &format )

// drop shadow
mShadowDrawChkBx->setChecked( shadow.enabled() );
mShadowFrame->setEnabled( shadow.enabled() );
mShadowUnderCmbBx->setCurrentIndex( mShadowUnderCmbBx->findData( shadow.shadowPlacement() ) );
mShadowOffsetAngleSpnBx->setValue( shadow.offsetAngle() );
mShadowOffsetSpnBx->setValue( shadow.offsetDistance() );
Expand Down Expand Up @@ -1653,6 +1659,10 @@ void QgsTextFormatWidget::updateBufferFrameStatus()
mBufferFrame->setEnabled( mBufferDrawDDBtn->isActive() || mBufferDrawChkBx->isChecked() );
}

void QgsTextFormatWidget::updateShadowFrameStatus()
{
mShadowFrame->setEnabled( mShadowDrawDDBtn->isActive() || mShadowDrawChkBx->isChecked() );
}

void QgsTextFormatWidget::setFormatFromStyle( const QString &name, QgsStyle::StyleEntity type )
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgstextformatwidget.h
Expand Up @@ -299,6 +299,7 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, public QgsExpressionConte
void createAuxiliaryField();
void updateShapeFrameStatus();
void updateBufferFrameStatus();
void updateShadowFrameStatus();
};


Expand Down

0 comments on commit bdaff62

Please sign in to comment.