Skip to content

Commit 857bae4

Browse files
authoredNov 14, 2017
Merge pull request #5609 from nyalldawson/remove_options
[needs-docs] Remove options for making layer names and groups bold
2 parents 3c8d50d + 91e2353 commit 857bae4

File tree

3 files changed

+90
-107
lines changed

3 files changed

+90
-107
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,8 +3689,8 @@ void QgisApp::setupLayerTreeViewFromSettings()
36893689
model->setFlag( QgsLayerTreeModel::ShowRasterPreviewIcon, s.value( QStringLiteral( "/qgis/createRasterLegendIcons" ), false ).toBool() );
36903690

36913691
QFont fontLayer, fontGroup;
3692-
fontLayer.setBold( s.value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool() );
3693-
fontGroup.setBold( s.value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool() );
3692+
fontLayer.setBold( true );
3693+
fontGroup.setBold( false );
36943694
model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeLayer, fontLayer );
36953695
model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeGroup, fontGroup );
36963696
}

‎src/app/qgsoptions.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
666666
// but the checkbox is true to use QPixmap
667667
chkAddedVisibility->setChecked( mSettings->value( QStringLiteral( "/qgis/new_layers_visible" ), true ).toBool() );
668668
cbxLegendClassifiers->setChecked( mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool() );
669-
mLegendLayersBoldChkBx->setChecked( mSettings->value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool() );
670-
mLegendGroupsBoldChkBx->setChecked( mSettings->value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool() );
671669
cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() );
672670
mDataSourceManagerNonModal->setChecked( mSettings->value( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), false ).toBool() );
673671
cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() );
@@ -1268,10 +1266,6 @@ void QgsOptions::saveOptions()
12681266

12691267
bool showLegendClassifiers = mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool();
12701268
mSettings->setValue( QStringLiteral( "/qgis/showLegendClassifiers" ), cbxLegendClassifiers->isChecked() );
1271-
bool legendLayersBold = mSettings->value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool();
1272-
mSettings->setValue( QStringLiteral( "/qgis/legendLayersBold" ), mLegendLayersBoldChkBx->isChecked() );
1273-
bool legendGroupsBold = mSettings->value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool();
1274-
mSettings->setValue( QStringLiteral( "/qgis/legendGroupsBold" ), mLegendGroupsBoldChkBx->isChecked() );
12751269
mSettings->setValue( QStringLiteral( "/qgis/hideSplash" ), cbxHideSplash->isChecked() );
12761270
mSettings->setValue( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), mDataSourceManagerNonModal->isChecked() );
12771271
mSettings->setValue( QStringLiteral( "/qgis/checkVersion" ), cbxCheckVersion->isChecked() );
@@ -1559,9 +1553,7 @@ void QgsOptions::saveOptions()
15591553
saveGdalDriverList();
15601554

15611555
// refresh legend if any legend item's state is to be changed
1562-
if ( legendLayersBold != mLegendLayersBoldChkBx->isChecked()
1563-
|| legendGroupsBold != mLegendGroupsBoldChkBx->isChecked()
1564-
|| legendLayersCapitalize != capitalizeCheckBox->isChecked() )
1556+
if ( legendLayersCapitalize != capitalizeCheckBox->isChecked() )
15651557
{
15661558
// TODO[MD] QgisApp::instance()->legend()->updateLegendItemStyles();
15671559
}

‎src/ui/qgsoptionsbase.ui

Lines changed: 87 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
<item>
309309
<widget class="QStackedWidget" name="mOptionsStackedWidget">
310310
<property name="currentIndex">
311-
<number>12</number>
311+
<number>5</number>
312312
</property>
313313
<widget class="QWidget" name="mOptionsPageGeneral">
314314
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -337,8 +337,8 @@
337337
<rect>
338338
<x>0</x>
339339
<y>0</y>
340-
<width>580</width>
341-
<height>804</height>
340+
<width>1159</width>
341+
<height>1434</height>
342342
</rect>
343343
</property>
344344
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -1032,8 +1032,8 @@
10321032
<rect>
10331033
<x>0</x>
10341034
<y>0</y>
1035-
<width>537</width>
1036-
<height>1128</height>
1035+
<width>1092</width>
1036+
<height>1502</height>
10371037
</rect>
10381038
</property>
10391039
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -1562,8 +1562,8 @@
15621562
<rect>
15631563
<x>0</x>
15641564
<y>0</y>
1565-
<width>499</width>
1566-
<height>754</height>
1565+
<width>1010</width>
1566+
<height>1266</height>
15671567
</rect>
15681568
</property>
15691569
<layout class="QVBoxLayout" name="verticalLayout_27">
@@ -1930,8 +1930,8 @@
19301930
<rect>
19311931
<x>0</x>
19321932
<y>0</y>
1933-
<width>672</width>
1934-
<height>1043</height>
1933+
<width>1351</width>
1934+
<height>1933</height>
19351935
</rect>
19361936
</property>
19371937
<layout class="QGridLayout" name="gridLayout_22">
@@ -2681,8 +2681,8 @@
26812681
<rect>
26822682
<x>0</x>
26832683
<y>0</y>
2684-
<width>130</width>
2685-
<height>322</height>
2684+
<width>741</width>
2685+
<height>779</height>
26862686
</rect>
26872687
</property>
26882688
<layout class="QHBoxLayout" name="horizontalLayout_46">
@@ -2832,8 +2832,8 @@
28322832
<rect>
28332833
<x>0</x>
28342834
<y>0</y>
2835-
<width>500</width>
2836-
<height>340</height>
2835+
<width>813</width>
2836+
<height>751</height>
28372837
</rect>
28382838
</property>
28392839
<layout class="QVBoxLayout" name="verticalLayout_25">
@@ -2992,34 +2992,19 @@
29922992
</item>
29932993
<item>
29942994
<layout class="QGridLayout" name="gridLayout_3">
2995-
<item row="1" column="2">
2996-
<widget class="Line" name="line_4">
2997-
<property name="minimumSize">
2998-
<size>
2999-
<width>12</width>
3000-
<height>0</height>
3001-
</size>
3002-
</property>
3003-
<property name="orientation">
3004-
<enum>Qt::Vertical</enum>
2995+
<item row="3" column="1" colspan="2">
2996+
<widget class="QCheckBox" name="cbxCreateRasterLegendIcons">
2997+
<property name="text">
2998+
<string>Create raster icons (may be slow)</string>
30052999
</property>
30063000
</widget>
30073001
</item>
3008-
<item row="1" column="0">
3009-
<spacer name="horizontalSpacer_34">
3010-
<property name="orientation">
3011-
<enum>Qt::Horizontal</enum>
3012-
</property>
3013-
<property name="sizeType">
3014-
<enum>QSizePolicy::Fixed</enum>
3015-
</property>
3016-
<property name="sizeHint" stdset="0">
3017-
<size>
3018-
<width>8</width>
3019-
<height>1</height>
3020-
</size>
3002+
<item row="2" column="1" colspan="2">
3003+
<widget class="QCheckBox" name="cbxLegendClassifiers">
3004+
<property name="text">
3005+
<string>Display classification attribute names</string>
30213006
</property>
3022-
</spacer>
3007+
</widget>
30233008
</item>
30243009
<item row="1" column="1">
30253010
<widget class="QCheckBox" name="capitalizeCheckBox">
@@ -3034,52 +3019,34 @@
30343019
</property>
30353020
</widget>
30363021
</item>
3037-
<item row="1" column="3">
3038-
<widget class="QCheckBox" name="mLegendLayersBoldChkBx">
3022+
<item row="0" column="0" colspan="3">
3023+
<widget class="QLabel" name="label_53">
30393024
<property name="sizePolicy">
3040-
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
3025+
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
30413026
<horstretch>0</horstretch>
30423027
<verstretch>0</verstretch>
30433028
</sizepolicy>
30443029
</property>
30453030
<property name="text">
3046-
<string>Bold layer names</string>
3047-
</property>
3048-
</widget>
3049-
</item>
3050-
<item row="3" column="1" colspan="3">
3051-
<widget class="QCheckBox" name="cbxLegendClassifiers">
3052-
<property name="text">
3053-
<string>Display classification attribute names</string>
3054-
</property>
3055-
</widget>
3056-
</item>
3057-
<item row="2" column="1" colspan="3">
3058-
<widget class="QCheckBox" name="mLegendGroupsBoldChkBx">
3059-
<property name="text">
3060-
<string>Bold group names</string>
3031+
<string>Legend item styles</string>
30613032
</property>
30623033
</widget>
30633034
</item>
3064-
<item row="4" column="1" colspan="3">
3065-
<widget class="QCheckBox" name="cbxCreateRasterLegendIcons">
3066-
<property name="text">
3067-
<string>Create raster icons (may be slow)</string>
3035+
<item row="1" column="0">
3036+
<spacer name="horizontalSpacer_34">
3037+
<property name="orientation">
3038+
<enum>Qt::Horizontal</enum>
30683039
</property>
3069-
</widget>
3070-
</item>
3071-
<item row="0" column="0" colspan="4">
3072-
<widget class="QLabel" name="label_53">
3073-
<property name="sizePolicy">
3074-
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
3075-
<horstretch>0</horstretch>
3076-
<verstretch>0</verstretch>
3077-
</sizepolicy>
3040+
<property name="sizeType">
3041+
<enum>QSizePolicy::Fixed</enum>
30783042
</property>
3079-
<property name="text">
3080-
<string>Legend item styles</string>
3043+
<property name="sizeHint" stdset="0">
3044+
<size>
3045+
<width>8</width>
3046+
<height>1</height>
3047+
</size>
30813048
</property>
3082-
</widget>
3049+
</spacer>
30833050
</item>
30843051
</layout>
30853052
</item>
@@ -3175,8 +3142,8 @@
31753142
<rect>
31763143
<x>0</x>
31773144
<y>0</y>
3178-
<width>623</width>
3179-
<height>734</height>
3145+
<width>1081</width>
3146+
<height>1164</height>
31803147
</rect>
31813148
</property>
31823149
<layout class="QVBoxLayout" name="verticalLayout_30">
@@ -3619,8 +3586,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
36193586
<rect>
36203587
<x>0</x>
36213588
<y>0</y>
3622-
<width>491</width>
3623-
<height>610</height>
3589+
<width>920</width>
3590+
<height>924</height>
36243591
</rect>
36253592
</property>
36263593
<layout class="QVBoxLayout" name="verticalLayout_39">
@@ -3888,8 +3855,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
38883855
<rect>
38893856
<x>0</x>
38903857
<y>0</y>
3891-
<width>548</width>
3892-
<height>785</height>
3858+
<width>1072</width>
3859+
<height>1551</height>
38933860
</rect>
38943861
</property>
38953862
<layout class="QVBoxLayout" name="verticalLayout_31">
@@ -4483,8 +4450,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
44834450
<rect>
44844451
<x>0</x>
44854452
<y>0</y>
4486-
<width>431</width>
4487-
<height>376</height>
4453+
<width>823</width>
4454+
<height>576</height>
44884455
</rect>
44894456
</property>
44904457
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -4622,8 +4589,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
46224589
<rect>
46234590
<x>0</x>
46244591
<y>0</y>
4625-
<width>418</width>
4626-
<height>544</height>
4592+
<width>838</width>
4593+
<height>855</height>
46274594
</rect>
46284595
</property>
46294596
<layout class="QGridLayout" name="gridLayout_15">
@@ -4845,8 +4812,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
48454812
<rect>
48464813
<x>0</x>
48474814
<y>0</y>
4848-
<width>866</width>
4849-
<height>930</height>
4815+
<width>1258</width>
4816+
<height>1349</height>
48504817
</rect>
48514818
</property>
48524819
<layout class="QVBoxLayout" name="verticalLayout_33">
@@ -5373,23 +5340,12 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
53735340
</widget>
53745341
<layoutdefault spacing="6" margin="11"/>
53755342
<customwidgets>
5376-
<customwidget>
5377-
<class>QgsColorButton</class>
5378-
<extends>QToolButton</extends>
5379-
<header>qgscolorbutton.h</header>
5380-
<container>1</container>
5381-
</customwidget>
53825343
<customwidget>
53835344
<class>QgsScrollArea</class>
53845345
<extends>QScrollArea</extends>
53855346
<header>qgsscrollarea.h</header>
53865347
<container>1</container>
53875348
</customwidget>
5388-
<customwidget>
5389-
<class>QgsSpinBox</class>
5390-
<extends>QSpinBox</extends>
5391-
<header>qgsspinbox.h</header>
5392-
</customwidget>
53935349
<customwidget>
53945350
<class>QgsCollapsibleGroupBox</class>
53955351
<extends>QGroupBox</extends>
@@ -5402,6 +5358,17 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
54025358
<header>qgsprojectionselectionwidget.h</header>
54035359
<container>1</container>
54045360
</customwidget>
5361+
<customwidget>
5362+
<class>QgsColorButton</class>
5363+
<extends>QToolButton</extends>
5364+
<header>qgscolorbutton.h</header>
5365+
<container>1</container>
5366+
</customwidget>
5367+
<customwidget>
5368+
<class>QgsSpinBox</class>
5369+
<extends>QSpinBox</extends>
5370+
<header>qgsspinbox.h</header>
5371+
</customwidget>
54055372
<customwidget>
54065373
<class>QgsVariableEditorWidget</class>
54075374
<extends>QWidget</extends>
@@ -5572,8 +5539,6 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
55725539
<tabstop>mLegendGrpBx</tabstop>
55735540
<tabstop>cmbLegendDoubleClickAction</tabstop>
55745541
<tabstop>capitalizeCheckBox</tabstop>
5575-
<tabstop>mLegendLayersBoldChkBx</tabstop>
5576-
<tabstop>mLegendGroupsBoldChkBx</tabstop>
55775542
<tabstop>cbxLegendClassifiers</tabstop>
55785543
<tabstop>cbxCreateRasterLegendIcons</tabstop>
55795544
<tabstop>mLegendGraphicResolutionSpinBox</tabstop>
@@ -5679,6 +5644,32 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
56795644
</tabstops>
56805645
<resources>
56815646
<include location="../../images/images.qrc"/>
5647+
<include location="../../images/images.qrc"/>
5648+
<include location="../../images/images.qrc"/>
5649+
<include location="../../images/images.qrc"/>
5650+
<include location="../../images/images.qrc"/>
5651+
<include location="../../images/images.qrc"/>
5652+
<include location="../../images/images.qrc"/>
5653+
<include location="../../images/images.qrc"/>
5654+
<include location="../../images/images.qrc"/>
5655+
<include location="../../images/images.qrc"/>
5656+
<include location="../../images/images.qrc"/>
5657+
<include location="../../images/images.qrc"/>
5658+
<include location="../../images/images.qrc"/>
5659+
<include location="../../images/images.qrc"/>
5660+
<include location="../../images/images.qrc"/>
5661+
<include location="../../images/images.qrc"/>
5662+
<include location="../../images/images.qrc"/>
5663+
<include location="../../images/images.qrc"/>
5664+
<include location="../../images/images.qrc"/>
5665+
<include location="../../images/images.qrc"/>
5666+
<include location="../../images/images.qrc"/>
5667+
<include location="../../images/images.qrc"/>
5668+
<include location="../../images/images.qrc"/>
5669+
<include location="../../images/images.qrc"/>
5670+
<include location="../../images/images.qrc"/>
5671+
<include location="../../images/images.qrc"/>
5672+
<include location="../../images/images.qrc"/>
56825673
</resources>
56835674
<connections>
56845675
<connection>

0 commit comments

Comments
 (0)
Please sign in to comment.