Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove scrollbar frame stroke and add help button to labels propertie…
…s dialog
  • Loading branch information
DelazJ authored and nirvn committed May 24, 2020
1 parent 585db64 commit b93161a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/app/labeling/qgslabelpropertydialog.cpp
Expand Up @@ -28,6 +28,7 @@
#include "qgssettings.h"
#include "qgsexpressioncontextutils.h"
#include "qgsgui.h"
#include "qgshelp.h"

#include <QColorDialog>
#include <QFontDatabase>
Expand All @@ -46,6 +47,7 @@ QgsLabelPropertyDialog::QgsLabelPropertyDialog( const QString &layerId, const QS
mLabelAllPartsCheckBox->setChecked( layerSettings.labelPerPart );

connect( buttonBox, &QDialogButtonBox::clicked, this, &QgsLabelPropertyDialog::buttonBox_clicked );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsLabelPropertyDialog::showHelp );
connect( mShowLabelChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::mShowLabelChkbx_toggled );
connect( mAlwaysShowChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::mAlwaysShowChkbx_toggled );
connect( mShowCalloutChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::showCalloutToggled );
Expand Down Expand Up @@ -818,3 +820,8 @@ void QgsLabelPropertyDialog::enableWidgetsForPinnedLabels()
mValiComboBox->setToolTip( QString() );
}
}

void QgsLabelPropertyDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#the-label-toolbar" ) );
}
1 change: 1 addition & 0 deletions src/app/labeling/qgslabelpropertydialog.h
Expand Up @@ -55,6 +55,7 @@ class APP_EXPORT QgsLabelPropertyDialog: public QDialog, private Ui::QgsLabelPro

private slots:
void buttonBox_clicked( QAbstractButton *button );
void showHelp();
void mShowLabelChkbx_toggled( bool chkd );
void mAlwaysShowChkbx_toggled( bool chkd );
void labelAllPartsToggled( bool checked );
Expand Down
27 changes: 21 additions & 6 deletions src/ui/labeling/qgslabelpropertydialogbase.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>451</width>
<height>388</height>
<height>703</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -30,19 +30,34 @@
</item>
<item>
<widget class="QgsScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>-196</y>
<width>417</width>
<height>707</height>
<y>-108</y>
<width>419</width>
<height>731</height>
</rect>
</property>
<layout class="QVBoxLayout" name="mLabelPropertiesLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="mDisplayGroupBox">
<property name="title">
Expand Down Expand Up @@ -113,7 +128,7 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<widget class="QFontComboBox" name="mFontFamilyCmbBx" />
<widget class="QFontComboBox" name="mFontFamilyCmbBx"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
Expand Down Expand Up @@ -656,7 +671,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
Expand Down

0 comments on commit b93161a

Please sign in to comment.