Skip to content

Commit 524bc79

Browse files
committed
Move labeling settings button to map item toolbar
1 parent 1b98247 commit 524bc79

File tree

2 files changed

+56
-64
lines changed

2 files changed

+56
-64
lines changed

src/app/layout/qgslayoutmapwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ QgsLayoutMapWidget::QgsLayoutMapWidget( QgsLayoutItemMap *item )
7878
connect( mOverviewCheckBox, &QgsCollapsibleGroupBoxBasic::toggled, this, &QgsLayoutMapWidget::mOverviewCheckBox_toggled );
7979
connect( mOverviewListWidget, &QListWidget::currentItemChanged, this, &QgsLayoutMapWidget::mOverviewListWidget_currentItemChanged );
8080
connect( mOverviewListWidget, &QListWidget::itemChanged, this, &QgsLayoutMapWidget::mOverviewListWidget_itemChanged );
81-
connect( mLabelSettingsButton, &QPushButton::clicked, this, &QgsLayoutMapWidget::showLabelSettings );
81+
connect( mActionLabelSettings, &QAction::triggered, this, &QgsLayoutMapWidget::showLabelSettings );
8282

8383
connect( mActionMoveContent, &QAction::triggered, this, &QgsLayoutMapWidget::switchToMoveContentTool );
8484
setPanelTitle( tr( "Map Properties" ) );

src/ui/layout/qgslayoutmapwidgetbase.ui

+55-63
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
<addaction name="mActionViewScaleInCanvas"/>
7272
<addaction name="separator"/>
7373
<addaction name="mActionMoveContent"/>
74+
<addaction name="separator"/>
75+
<addaction name="mActionLabelSettings"/>
7476
</widget>
7577
</item>
7678
<item>
@@ -87,7 +89,7 @@
8789
<x>0</x>
8890
<y>0</y>
8991
<width>368</width>
90-
<height>1373</height>
92+
<height>1253</height>
9193
</rect>
9294
</property>
9395
<property name="sizePolicy">
@@ -297,29 +299,27 @@
297299
<bool>false</bool>
298300
</property>
299301
<layout class="QGridLayout" name="gridLayout">
300-
<item row="0" column="0">
301-
<widget class="QLabel" name="mXMinLabel">
302-
<property name="enabled">
303-
<bool>true</bool>
304-
</property>
305-
<property name="text">
306-
<string>X min</string>
307-
</property>
308-
<property name="wordWrap">
309-
<bool>false</bool>
310-
</property>
311-
<property name="buddy">
312-
<cstring>mXMinLineEdit</cstring>
313-
</property>
314-
</widget>
302+
<item row="1" column="1">
303+
<layout class="QHBoxLayout" name="horizontalLayout_3">
304+
<item>
305+
<widget class="QLineEdit" name="mYMinLineEdit"/>
306+
</item>
307+
<item>
308+
<widget class="QgsPropertyOverrideButton" name="mYMinDDBtn">
309+
<property name="text">
310+
<string>…</string>
311+
</property>
312+
</widget>
313+
</item>
314+
</layout>
315315
</item>
316-
<item row="0" column="1">
317-
<layout class="QHBoxLayout" name="horizontalLayout">
316+
<item row="2" column="1">
317+
<layout class="QHBoxLayout" name="horizontalLayout_4">
318318
<item>
319-
<widget class="QLineEdit" name="mXMinLineEdit"/>
319+
<widget class="QLineEdit" name="mXMaxLineEdit"/>
320320
</item>
321321
<item>
322-
<widget class="QgsPropertyOverrideButton" name="mXMinDDBtn">
322+
<widget class="QgsPropertyOverrideButton" name="mXMaxDDBtn">
323323
<property name="text">
324324
<string>…</string>
325325
</property>
@@ -340,13 +340,13 @@
340340
</property>
341341
</widget>
342342
</item>
343-
<item row="1" column="1">
344-
<layout class="QHBoxLayout" name="horizontalLayout_3">
343+
<item row="3" column="1">
344+
<layout class="QHBoxLayout" name="horizontalLayout_5">
345345
<item>
346-
<widget class="QLineEdit" name="mYMinLineEdit"/>
346+
<widget class="QLineEdit" name="mYMaxLineEdit"/>
347347
</item>
348348
<item>
349-
<widget class="QgsPropertyOverrideButton" name="mYMinDDBtn">
349+
<widget class="QgsPropertyOverrideButton" name="mYMaxDDBtn">
350350
<property name="text">
351351
<string>…</string>
352352
</property>
@@ -367,71 +367,52 @@
367367
</property>
368368
</widget>
369369
</item>
370-
<item row="2" column="1">
371-
<layout class="QHBoxLayout" name="horizontalLayout_4">
370+
<item row="0" column="1">
371+
<layout class="QHBoxLayout" name="horizontalLayout">
372372
<item>
373-
<widget class="QLineEdit" name="mXMaxLineEdit"/>
373+
<widget class="QLineEdit" name="mXMinLineEdit"/>
374374
</item>
375375
<item>
376-
<widget class="QgsPropertyOverrideButton" name="mXMaxDDBtn">
376+
<widget class="QgsPropertyOverrideButton" name="mXMinDDBtn">
377377
<property name="text">
378378
<string>…</string>
379379
</property>
380380
</widget>
381381
</item>
382382
</layout>
383383
</item>
384-
<item row="3" column="0">
385-
<widget class="QLabel" name="mYMaxLabel">
384+
<item row="0" column="0">
385+
<widget class="QLabel" name="mXMinLabel">
386+
<property name="enabled">
387+
<bool>true</bool>
388+
</property>
386389
<property name="text">
387-
<string>Y max</string>
390+
<string>X min</string>
388391
</property>
389392
<property name="wordWrap">
390393
<bool>false</bool>
391394
</property>
392395
<property name="buddy">
393-
<cstring>mYMaxLineEdit</cstring>
396+
<cstring>mXMinLineEdit</cstring>
394397
</property>
395398
</widget>
396399
</item>
397-
<item row="3" column="1">
398-
<layout class="QHBoxLayout" name="horizontalLayout_5">
399-
<item>
400-
<widget class="QLineEdit" name="mYMaxLineEdit"/>
401-
</item>
402-
<item>
403-
<widget class="QgsPropertyOverrideButton" name="mYMaxDDBtn">
404-
<property name="text">
405-
<string>…</string>
406-
</property>
407-
</widget>
408-
</item>
409-
</layout>
410-
</item>
411-
<item row="4" column="0" colspan="2">
412-
<widget class="QPushButton" name="mSetToMapCanvasExtentButton">
400+
<item row="3" column="0">
401+
<widget class="QLabel" name="mYMaxLabel">
413402
<property name="text">
414-
<string>Set to Map Canvas Extent</string>
403+
<string>Y max</string>
415404
</property>
416-
</widget>
417-
</item>
418-
<item row="5" column="0" colspan="2">
419-
<widget class="QPushButton" name="mViewExtentInCanvasButton">
420-
<property name="text">
421-
<string>View Extent in Map Canvas</string>
405+
<property name="wordWrap">
406+
<bool>false</bool>
407+
</property>
408+
<property name="buddy">
409+
<cstring>mYMaxLineEdit</cstring>
422410
</property>
423411
</widget>
424412
</item>
425413
</layout>
426414
</widget>
427415
</item>
428-
<item>
429-
<widget class="QPushButton" name="mLabelSettingsButton">
430-
<property name="text">
431-
<string>Label Settings…</string>
432-
</property>
433-
</widget>
434-
</item>
435416
<item>
436417
<widget class="QgsCollapsibleGroupBoxBasic" name="mAtlasCheckBox">
437418
<property name="title">
@@ -877,6 +858,18 @@
877858
<string>Set Map Scale to Match Main Canvas Scale</string>
878859
</property>
879860
</action>
861+
<action name="mActionLabelSettings">
862+
<property name="icon">
863+
<iconset resource="../../../images/images.qrc">
864+
<normaloff>:/images/themes/default/labelingSingle.svg</normaloff>:/images/themes/default/labelingSingle.svg</iconset>
865+
</property>
866+
<property name="text">
867+
<string>Label Settings</string>
868+
</property>
869+
<property name="toolTip">
870+
<string>Labeling Settings</string>
871+
</property>
872+
</action>
880873
</widget>
881874
<layoutdefault spacing="6" margin="11"/>
882875
<customwidgets>
@@ -954,7 +947,6 @@
954947
<tabstop>mXMaxDDBtn</tabstop>
955948
<tabstop>mYMaxLineEdit</tabstop>
956949
<tabstop>mYMaxDDBtn</tabstop>
957-
<tabstop>mLabelSettingsButton</tabstop>
958950
<tabstop>mAtlasCheckBox</tabstop>
959951
<tabstop>mAtlasMarginRadio</tabstop>
960952
<tabstop>mAtlasMarginSpinBox</tabstop>

0 commit comments

Comments
 (0)