Skip to content

Commit

Permalink
[python console] improve settings UI (#7041)
Browse files Browse the repository at this point in the history
- improve UI spacing
- harmonize reset icon
  • Loading branch information
nirvn authored May 21, 2018
1 parent 42199d1 commit a7397b1
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 33 deletions.
1 change: 0 additions & 1 deletion images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
<file>themes/default/console/iconSearchNextEditorConsole.svg</file>
<file>themes/default/console/iconSearchPrevEditorConsole.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/dbmanager.svg</file>
<file>themes/default/extents.svg</file>
Expand Down
1 change: 0 additions & 1 deletion images/themes/default/console/iconResetColorConsole.svg

This file was deleted.

4 changes: 2 additions & 2 deletions python/console/console_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def __init__(self, parent):
self.removeAPIpath.clicked.connect(self.removeAPI)
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.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.resetFontColor.clicked.connect(self._resetFontColor)
self.resetFontColorEditor.clicked.connect(self._resetFontColorEditor)
Expand Down
105 changes: 76 additions & 29 deletions python/console/console_settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>870</width>
<height>581</height>
<width>995</width>
<height>630</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -396,56 +396,56 @@
</property>
</widget>
</item>
<item row="3" column="4">
<item row="4" column="0">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Triple single quote</string>
</property>
</widget>
</item>
<item row="3" column="5">
<item row="4" column="1">
<widget class="QgsColorButton" name="tripleSingleQuoteFontColor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="4" column="2">
<widget class="QLabel" name="label_30">
<property name="text">
<string>Triple double quote</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="4" column="3">
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="4">
<item row="3" column="4">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Background</string>
</property>
</widget>
</item>
<item row="4" column="5">
<item row="3" column="5">
<widget class="QgsColorButton" name="paperBackgroundColor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="4">
<item row="4" column="4">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Error</string>
</property>
</widget>
</item>
<item row="5" column="5">
<item row="4" column="5">
<widget class="QgsColorButton" name="stderrFontColor">
<property name="text">
<string/>
Expand Down Expand Up @@ -605,6 +605,19 @@
</layout>
</widget>
</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>
</widget>
</widget>
Expand Down Expand Up @@ -644,23 +657,44 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="enableObjectInspector">
<property name="text">
<string>Enable Object Inspector (switching between tabs may be slow)</string>
<widget class="QgsCollapsibleGroupBox" name="groupBoxRunDebugEditor">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="checked">
<property name="title">
<string>Run and Debug</string>
</property>
<property name="collapsed" stdset="0">
<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 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>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBoxFontColorEditor">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
Expand Down Expand Up @@ -890,42 +924,42 @@
</property>
</widget>
</item>
<item row="3" column="4">
<item row="4" column="0">
<widget class="QLabel" name="label_34">
<property name="text">
<string>Triple single quote</string>
</property>
</widget>
</item>
<item row="3" column="5">
<item row="4" column="1">
<widget class="QgsColorButton" name="tripleSingleQuoteFontColorEditor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="4" column="2">
<widget class="QLabel" name="label_35">
<property name="text">
<string>Triple double quote</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="4" column="3">
<widget class="QgsColorButton" name="tripleDoubleQuoteFontColorEditor">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="4">
<item row="3" column="4">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Background</string>
</property>
</widget>
</item>
<item row="4" column="5">
<item row="3" column="5">
<widget class="QgsColorButton" name="paperBackgroundColorEditor">
<property name="text">
<string/>
Expand Down Expand Up @@ -967,7 +1001,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="2" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBoxAutoCompletionEditor">
<property name="title">
<string>Autocompletion</string>
Expand Down Expand Up @@ -1052,7 +1086,7 @@
</layout>
</widget>
</item>
<item row="4" column="0">
<item row="3" column="0">
<widget class="QgsCollapsibleGroupBox" name="groupBox_5">
<property name="title">
<string>Typing</string>
Expand Down Expand Up @@ -1085,6 +1119,19 @@
</layout>
</widget>
</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>
</widget>
</widget>
Expand Down

0 comments on commit a7397b1

Please sign in to comment.