Skip to content

Commit

Permalink
HTML formatting checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 12, 2020
1 parent df88d42 commit 2cbea02
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 189 deletions.
5 changes: 4 additions & 1 deletion src/gui/qgstextformatwidget.cpp
Expand Up @@ -477,7 +477,8 @@ void QgsTextFormatWidget::initWidget()
<< mMaskJoinStyleComboBox
<< mMaskBufferSizeSpinBox
<< mMaskOpacityWidget
<< mCheckAllowLabelsOutsidePolygons;
<< mCheckAllowLabelsOutsidePolygons
<< mHtmlFormattingCheckBox;

connectValueChanged( widgets, SLOT( updatePreview() ) );

Expand Down Expand Up @@ -887,6 +888,7 @@ void QgsTextFormatWidget::updateWidgetForFormat( const QgsTextFormat &format )
mTextOpacityWidget->setOpacity( format.opacity() );
comboBlendMode->setBlendMode( format.blendMode() );
mTextOrientationComboBox->setCurrentIndex( mTextOrientationComboBox->findData( format.orientation() ) );
mHtmlFormattingCheckBox->setChecked( format.allowHtmlFormatting() );

mFontWordSpacingSpinBox->setValue( format.font().wordSpacing() );
mFontLetterSpacingSpinBox->setValue( format.font().letterSpacing() );
Expand Down Expand Up @@ -1012,6 +1014,7 @@ QgsTextFormat QgsTextFormatWidget::format( bool includeDataDefinedProperties ) c
format.setLineHeight( mFontLineHeightSpinBox->value() );
format.setPreviewBackgroundColor( mPreviewBackgroundColor );
format.setOrientation( static_cast< QgsTextFormat::TextOrientation >( mTextOrientationComboBox->currentData().toInt() ) );
format.setAllowHtmlFormatting( mHtmlFormattingCheckBox->isChecked( ) );

// buffer
QgsTextBufferSettings buffer;
Expand Down

0 comments on commit 2cbea02

Please sign in to comment.