Skip to content

Commit b93161a

Browse files
DelazJnirvn
authored andcommittedMay 24, 2020
Remove scrollbar frame stroke and add help button to labels properties dialog
1 parent 585db64 commit b93161a

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed
 

‎src/app/labeling/qgslabelpropertydialog.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "qgssettings.h"
2929
#include "qgsexpressioncontextutils.h"
3030
#include "qgsgui.h"
31+
#include "qgshelp.h"
3132

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

4849
connect( buttonBox, &QDialogButtonBox::clicked, this, &QgsLabelPropertyDialog::buttonBox_clicked );
50+
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsLabelPropertyDialog::showHelp );
4951
connect( mShowLabelChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::mShowLabelChkbx_toggled );
5052
connect( mAlwaysShowChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::mAlwaysShowChkbx_toggled );
5153
connect( mShowCalloutChkbx, &QCheckBox::toggled, this, &QgsLabelPropertyDialog::showCalloutToggled );
@@ -818,3 +820,8 @@ void QgsLabelPropertyDialog::enableWidgetsForPinnedLabels()
818820
mValiComboBox->setToolTip( QString() );
819821
}
820822
}
823+
824+
void QgsLabelPropertyDialog::showHelp()
825+
{
826+
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#the-label-toolbar" ) );
827+
}

‎src/app/labeling/qgslabelpropertydialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class APP_EXPORT QgsLabelPropertyDialog: public QDialog, private Ui::QgsLabelPro
5555

5656
private slots:
5757
void buttonBox_clicked( QAbstractButton *button );
58+
void showHelp();
5859
void mShowLabelChkbx_toggled( bool chkd );
5960
void mAlwaysShowChkbx_toggled( bool chkd );
6061
void labelAllPartsToggled( bool checked );

‎src/ui/labeling/qgslabelpropertydialogbase.ui

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>451</width>
10-
<height>388</height>
10+
<height>703</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -30,19 +30,34 @@
3030
</item>
3131
<item>
3232
<widget class="QgsScrollArea" name="scrollArea">
33+
<property name="frameShape">
34+
<enum>QFrame::NoFrame</enum>
35+
</property>
3336
<property name="widgetResizable">
3437
<bool>true</bool>
3538
</property>
3639
<widget class="QWidget" name="scrollAreaWidgetContents">
3740
<property name="geometry">
3841
<rect>
3942
<x>0</x>
40-
<y>-196</y>
41-
<width>417</width>
42-
<height>707</height>
43+
<y>-108</y>
44+
<width>419</width>
45+
<height>731</height>
4346
</rect>
4447
</property>
4548
<layout class="QVBoxLayout" name="mLabelPropertiesLayout">
49+
<property name="leftMargin">
50+
<number>0</number>
51+
</property>
52+
<property name="topMargin">
53+
<number>0</number>
54+
</property>
55+
<property name="rightMargin">
56+
<number>0</number>
57+
</property>
58+
<property name="bottomMargin">
59+
<number>0</number>
60+
</property>
4661
<item>
4762
<widget class="QgsCollapsibleGroupBox" name="mDisplayGroupBox">
4863
<property name="title">
@@ -113,7 +128,7 @@
113128
</property>
114129
<layout class="QGridLayout" name="gridLayout">
115130
<item row="0" column="0" colspan="3">
116-
<widget class="QFontComboBox" name="mFontFamilyCmbBx" />
131+
<widget class="QFontComboBox" name="mFontFamilyCmbBx"/>
117132
</item>
118133
<item row="1" column="0">
119134
<widget class="QLabel" name="label_3">
@@ -656,7 +671,7 @@
656671
<enum>Qt::Horizontal</enum>
657672
</property>
658673
<property name="standardButtons">
659-
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
674+
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
660675
</property>
661676
</widget>
662677
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.