Skip to content

Commit a7397b1

Browse files
authoredMay 21, 2018
[python console] improve settings UI (#7041)
- improve UI spacing - harmonize reset icon
1 parent 42199d1 commit a7397b1

File tree

4 files changed

+78
-33
lines changed

4 files changed

+78
-33
lines changed
 

‎images/images.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<file>themes/default/console/iconSearchNextEditorConsole.svg</file>
145145
<file>themes/default/console/iconSearchPrevEditorConsole.svg</file>
146146
<file>themes/default/console/iconSyntaxErrorConsole.svg</file>
147-
<file>themes/default/console/iconResetColorConsole.svg</file>
148147
<file>themes/default/copyright_label.svg</file>
149148
<file>themes/default/dbmanager.svg</file>
150149
<file>themes/default/extents.svg</file>

‎images/themes/default/console/iconResetColorConsole.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎python/console/console_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def __init__(self, parent):
5454
self.removeAPIpath.clicked.connect(self.removeAPI)
5555
self.compileAPIs.clicked.connect(self._prepareAPI)
5656

57-
self.resetFontColor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.svg"))
57+
self.resetFontColor.setIcon(QIcon(":/images/themes/default/mActionUndo.svg"))
5858
self.resetFontColor.setIconSize(QSize(18, 18))
59-
self.resetFontColorEditor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.svg"))
59+
self.resetFontColorEditor.setIcon(QIcon(":/images/themes/default/mActionUndo.svg"))
6060
self.resetFontColorEditor.setIconSize(QSize(18, 18))
6161
self.resetFontColor.clicked.connect(self._resetFontColor)
6262
self.resetFontColorEditor.clicked.connect(self._resetFontColorEditor)

‎python/console/console_settings.ui

Lines changed: 76 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<rect>
1010
<x>0</x>
1111
<y>0</y>
12-
<width>870</width>
13-
<height>581</height>
12+
<width>995</width>
13+
<height>630</height>
1414
</rect>
1515
</property>
1616
<property name="sizePolicy">
@@ -396,56 +396,56 @@
396396
</property>
397397
</widget>
398398
</item>
399-
<item row="3" column="4">
399+
<item row="4" column="0">
400400
<widget class="QLabel" name="label_29">
401401
<property name="text">
402402
<string>Triple single quote</string>
403403
</property>
404404
</widget>
405405
</item>
406-
<item row="3" column="5">
406+
<item row="4" column="1">
407407
<widget class="QgsColorButton" name="tripleSingleQuoteFontColor">
408408
<property name="text">
409409
<string/>
410410
</property>
411411
</widget>
412412
</item>
413-
<item row="4" column="0">
413+
<item row="4" column="2">
414414
<widget class="QLabel" name="label_30">
415415
<property name="text">
416416
<string>Triple double quote</string>
417417
</property>
418418
</widget>
419419
</item>
420-
<item row="4" column="1">
420+
<item row="4" column="3">
421421
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColor">
422422
<property name="text">
423423
<string/>
424424
</property>
425425
</widget>
426426
</item>
427-
<item row="4" column="4">
427+
<item row="3" column="4">
428428
<widget class="QLabel" name="label_15">
429429
<property name="text">
430430
<string>Background</string>
431431
</property>
432432
</widget>
433433
</item>
434-
<item row="4" column="5">
434+
<item row="3" column="5">
435435
<widget class="QgsColorButton" name="paperBackgroundColor">
436436
<property name="text">
437437
<string/>
438438
</property>
439439
</widget>
440440
</item>
441-
<item row="5" column="4">
441+
<item row="4" column="4">
442442
<widget class="QLabel" name="label_14">
443443
<property name="text">
444444
<string>Error</string>
445445
</property>
446446
</widget>
447447
</item>
448-
<item row="5" column="5">
448+
<item row="4" column="5">
449449
<widget class="QgsColorButton" name="stderrFontColor">
450450
<property name="text">
451451
<string/>
@@ -605,6 +605,19 @@
605605
</layout>
606606
</widget>
607607
</item>
608+
<item row="3" column="0">
609+
<spacer name="verticalSpacer2">
610+
<property name="orientation">
611+
<enum>Qt::Vertical</enum>
612+
</property>
613+
<property name="sizeHint" stdset="0">
614+
<size>
615+
<width>20</width>
616+
<height>0</height>
617+
</size>
618+
</property>
619+
</spacer>
620+
</item>
608621
</layout>
609622
</widget>
610623
</widget>
@@ -644,23 +657,44 @@
644657
<number>0</number>
645658
</property>
646659
<item row="0" column="0">
647-
<widget class="QCheckBox" name="enableObjectInspector">
648-
<property name="text">
649-
<string>Enable Object Inspector (switching between tabs may be slow)</string>
660+
<widget class="QgsCollapsibleGroupBox" name="groupBoxRunDebugEditor">
661+
<property name="sizePolicy">
662+
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
663+
<horstretch>0</horstretch>
664+
<verstretch>0</verstretch>
665+
</sizepolicy>
650666
</property>
651-
<property name="checked">
667+
<property name="title">
668+
<string>Run and Debug</string>
669+
</property>
670+
<property name="collapsed" stdset="0">
652671
<bool>false</bool>
653672
</property>
654-
</widget>
655-
</item>
656-
<item row="1" column="0">
657-
<widget class="QCheckBox" name="autoSaveScript">
658-
<property name="text">
659-
<string>Auto-save script before running</string>
673+
<property name="saveCollapsedState" stdset="0">
674+
<bool>true</bool>
660675
</property>
676+
<layout class="QGridLayout" name="gridLayout_14">
677+
<item row="0" column="0">
678+
<widget class="QCheckBox" name="enableObjectInspector">
679+
<property name="text">
680+
<string>Enable Object Inspector (switching between tabs may be slow)</string>
681+
</property>
682+
<property name="checked">
683+
<bool>false</bool>
684+
</property>
685+
</widget>
686+
</item>
687+
<item row="1" column="0">
688+
<widget class="QCheckBox" name="autoSaveScript">
689+
<property name="text">
690+
<string>Auto-save script before running</string>
691+
</property>
692+
</widget>
693+
</item>
694+
</layout>
661695
</widget>
662696
</item>
663-
<item row="2" column="0">
697+
<item row="1" column="0">
664698
<widget class="QgsCollapsibleGroupBox" name="groupBoxFontColorEditor">
665699
<property name="sizePolicy">
666700
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@@ -890,42 +924,42 @@
890924
</property>
891925
</widget>
892926
</item>
893-
<item row="3" column="4">
927+
<item row="4" column="0">
894928
<widget class="QLabel" name="label_34">
895929
<property name="text">
896930
<string>Triple single quote</string>
897931
</property>
898932
</widget>
899933
</item>
900-
<item row="3" column="5">
934+
<item row="4" column="1">
901935
<widget class="QgsColorButton" name="tripleSingleQuoteFontColorEditor">
902936
<property name="text">
903937
<string/>
904938
</property>
905939
</widget>
906940
</item>
907-
<item row="4" column="0">
941+
<item row="4" column="2">
908942
<widget class="QLabel" name="label_35">
909943
<property name="text">
910944
<string>Triple double quote</string>
911945
</property>
912946
</widget>
913947
</item>
914-
<item row="4" column="1">
948+
<item row="4" column="3">
915949
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColorEditor">
916950
<property name="text">
917951
<string/>
918952
</property>
919953
</widget>
920954
</item>
921-
<item row="4" column="4">
955+
<item row="3" column="4">
922956
<widget class="QLabel" name="label_21">
923957
<property name="text">
924958
<string>Background</string>
925959
</property>
926960
</widget>
927961
</item>
928-
<item row="4" column="5">
962+
<item row="3" column="5">
929963
<widget class="QgsColorButton" name="paperBackgroundColorEditor">
930964
<property name="text">
931965
<string/>
@@ -967,7 +1001,7 @@
9671001
</layout>
9681002
</widget>
9691003
</item>
970-
<item row="3" column="0">
1004+
<item row="2" column="0">
9711005
<widget class="QgsCollapsibleGroupBox" name="groupBoxAutoCompletionEditor">
9721006
<property name="title">
9731007
<string>Autocompletion</string>
@@ -1052,7 +1086,7 @@
10521086
</layout>
10531087
</widget>
10541088
</item>
1055-
<item row="4" column="0">
1089+
<item row="3" column="0">
10561090
<widget class="QgsCollapsibleGroupBox" name="groupBox_5">
10571091
<property name="title">
10581092
<string>Typing</string>
@@ -1085,6 +1119,19 @@
10851119
</layout>
10861120
</widget>
10871121
</item>
1122+
<item row="5" column="0">
1123+
<spacer name="verticalSpacer">
1124+
<property name="orientation">
1125+
<enum>Qt::Vertical</enum>
1126+
</property>
1127+
<property name="sizeHint" stdset="0">
1128+
<size>
1129+
<width>20</width>
1130+
<height>0</height>
1131+
</size>
1132+
</property>
1133+
</spacer>
1134+
</item>
10881135
</layout>
10891136
</widget>
10901137
</widget>

0 commit comments

Comments
 (0)
Please sign in to comment.