[python console] improve settings UI (#7041)

- improve UI spacing
- harmonize reset icon
This commit is contained in:
Mathieu Pellerin 2018-05-21 16:48:43 +07:00 committed by GitHub
parent 42199d1ad0
commit a7397b1726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 33 deletions

View File

@ -144,7 +144,6 @@
<file>themes/default/console/iconSearchNextEditorConsole.svg</file> <file>themes/default/console/iconSearchNextEditorConsole.svg</file>
<file>themes/default/console/iconSearchPrevEditorConsole.svg</file> <file>themes/default/console/iconSearchPrevEditorConsole.svg</file>
<file>themes/default/console/iconSyntaxErrorConsole.svg</file> <file>themes/default/console/iconSyntaxErrorConsole.svg</file>
<file>themes/default/console/iconResetColorConsole.svg</file>
<file>themes/default/copyright_label.svg</file> <file>themes/default/copyright_label.svg</file>
<file>themes/default/dbmanager.svg</file> <file>themes/default/dbmanager.svg</file>
<file>themes/default/extents.svg</file> <file>themes/default/extents.svg</file>

View File

@ -1 +0,0 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><g><path d="m19.1 12a7.07 7.07 0 0 1 -2.07 5l-5-5z" fill="#eb3131"/><path d="m17 17a7.07 7.07 0 0 1 -5 2.07l1e-6-7.07z" fill="#b11c2d"/><path d="m12 19.1a7.07 7.07 0 0 1 -5 -2.07l5-5z" fill="#e47acd"/><path d="m7 17a7.07 7.07 0 0 1 -2.07 -5h7.07z" fill="#6994d3"/><path d="m4.93 12a7.07 7.07 0 0 1 2.07 -5l5 5z" fill="#3eae35"/><path d="m7 7a7.07 7.07 0 0 1 5 -2.07l1e-6 7.07z" fill="#89df34"/><path d="m12 4.93a7.07 7.07 0 0 1 5 2.07l-5 5z" fill="#fce94f"/><path d="m17 7a7.07 7.07 0 0 1 2.07 5h-7.07z" fill="#e4972d"/></g><path d="m7 .5 4.5 5-4.5 5v-3.5h-2.14c-3.24 0-1.81 3.33.168 3.33v1.33c-1.82 0-5.02-1.16-5.02-4.22 0-1.4.853-3.44 3.69-3.44h3.31z" fill="#3f79db"/><path d="m17 23.5-4.5-5 4.5-5v3.5h2.14c3.24 0 1.81-3.33-.168-3.33v-1.33c1.82 0 5.02 1.16 5.02 4.22 0 1.4-.853 3.44-3.69 3.44h-3.31z" fill="#3f79db"/></svg>

Before

Width:  |  Height:  |  Size: 889 B

View File

@ -54,9 +54,9 @@ class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
self.removeAPIpath.clicked.connect(self.removeAPI) self.removeAPIpath.clicked.connect(self.removeAPI)
self.compileAPIs.clicked.connect(self._prepareAPI) self.compileAPIs.clicked.connect(self._prepareAPI)
self.resetFontColor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.svg")) self.resetFontColor.setIcon(QIcon(":/images/themes/default/mActionUndo.svg"))
self.resetFontColor.setIconSize(QSize(18, 18)) self.resetFontColor.setIconSize(QSize(18, 18))
self.resetFontColorEditor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.svg")) self.resetFontColorEditor.setIcon(QIcon(":/images/themes/default/mActionUndo.svg"))
self.resetFontColorEditor.setIconSize(QSize(18, 18)) self.resetFontColorEditor.setIconSize(QSize(18, 18))
self.resetFontColor.clicked.connect(self._resetFontColor) self.resetFontColor.clicked.connect(self._resetFontColor)
self.resetFontColorEditor.clicked.connect(self._resetFontColorEditor) self.resetFontColorEditor.clicked.connect(self._resetFontColorEditor)

View File

@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>870</width> <width>995</width>
<height>581</height> <height>630</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -396,56 +396,56 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4"> <item row="4" column="0">
<widget class="QLabel" name="label_29"> <widget class="QLabel" name="label_29">
<property name="text"> <property name="text">
<string>Triple single quote</string> <string>Triple single quote</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="5"> <item row="4" column="1">
<widget class="QgsColorButton" name="tripleSingleQuoteFontColor"> <widget class="QgsColorButton" name="tripleSingleQuoteFontColor">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="2">
<widget class="QLabel" name="label_30"> <widget class="QLabel" name="label_30">
<property name="text"> <property name="text">
<string>Triple double quote</string> <string>Triple double quote</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="3">
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColor"> <widget class="QgsColorButton" name="tripleDoubleQuoteFontColor">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="4"> <item row="3" column="4">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
<string>Background</string> <string>Background</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="5"> <item row="3" column="5">
<widget class="QgsColorButton" name="paperBackgroundColor"> <widget class="QgsColorButton" name="paperBackgroundColor">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="4"> <item row="4" column="4">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="text"> <property name="text">
<string>Error</string> <string>Error</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="5"> <item row="4" column="5">
<widget class="QgsColorButton" name="stderrFontColor"> <widget class="QgsColorButton" name="stderrFontColor">
<property name="text"> <property name="text">
<string/> <string/>
@ -605,6 +605,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<spacer name="verticalSpacer2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -644,23 +657,44 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="enableObjectInspector"> <widget class="QgsCollapsibleGroupBox" name="groupBoxRunDebugEditor">
<property name="text"> <property name="sizePolicy">
<string>Enable Object Inspector (switching between tabs may be slow)</string> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="checked"> <property name="title">
<string>Run and Debug</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_14">
<item row="0" column="0">
<widget class="QCheckBox" name="enableObjectInspector">
<property name="text">
<string>Enable Object Inspector (switching between tabs may be slow)</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="autoSaveScript">
<property name="text">
<string>Auto-save script before running</string>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="autoSaveScript">
<property name="text">
<string>Auto-save script before running</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBoxFontColorEditor"> <widget class="QgsCollapsibleGroupBox" name="groupBoxFontColorEditor">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@ -890,42 +924,42 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4"> <item row="4" column="0">
<widget class="QLabel" name="label_34"> <widget class="QLabel" name="label_34">
<property name="text"> <property name="text">
<string>Triple single quote</string> <string>Triple single quote</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="5"> <item row="4" column="1">
<widget class="QgsColorButton" name="tripleSingleQuoteFontColorEditor"> <widget class="QgsColorButton" name="tripleSingleQuoteFontColorEditor">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="2">
<widget class="QLabel" name="label_35"> <widget class="QLabel" name="label_35">
<property name="text"> <property name="text">
<string>Triple double quote</string> <string>Triple double quote</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="3">
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColorEditor"> <widget class="QgsColorButton" name="tripleDoubleQuoteFontColorEditor">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="4"> <item row="3" column="4">
<widget class="QLabel" name="label_21"> <widget class="QLabel" name="label_21">
<property name="text"> <property name="text">
<string>Background</string> <string>Background</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="5"> <item row="3" column="5">
<widget class="QgsColorButton" name="paperBackgroundColorEditor"> <widget class="QgsColorButton" name="paperBackgroundColorEditor">
<property name="text"> <property name="text">
<string/> <string/>
@ -967,7 +1001,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBoxAutoCompletionEditor"> <widget class="QgsCollapsibleGroupBox" name="groupBoxAutoCompletionEditor">
<property name="title"> <property name="title">
<string>Autocompletion</string> <string>Autocompletion</string>
@ -1052,7 +1086,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBox_5"> <widget class="QgsCollapsibleGroupBox" name="groupBox_5">
<property name="title"> <property name="title">
<string>Typing</string> <string>Typing</string>
@ -1085,6 +1119,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>