Skip to content

Commit

Permalink
UX improvements to photo, web view and external resource widget config
Browse files Browse the repository at this point in the history
- Better explanatory text
- Change '0' values to 'Auto'
- Ad 'px' suffix to values
- Allow resetting sizes to Auto with clear button
  • Loading branch information
nyalldawson committed Apr 5, 2016
1 parent bcb2c73 commit e571885
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 12 deletions.
26 changes: 21 additions & 5 deletions src/ui/editorwidgets/qgsexternalresourceconfigdlg.ui
Expand Up @@ -45,7 +45,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-206</y>
<y>-210</y>
<width>465</width>
<height>621</height>
</rect>
Expand Down Expand Up @@ -316,9 +316,12 @@
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="mDocumentViewerHeight">
<widget class="QgsSpinBox" name="mDocumentViewerHeight">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string/>
<string> px</string>
</property>
<property name="prefix">
<string/>
Expand All @@ -329,7 +332,13 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="mDocumentViewerWidth">
<widget class="QgsSpinBox" name="mDocumentViewerWidth">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
Expand All @@ -345,7 +354,7 @@
<item row="1" column="3" rowspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Specify the size of the preview. If you leave it set to 0, an optimal size will be estimated.</string>
<string>Specify the size of the preview. If you leave it set to Auto, an optimal size will be calculated.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down Expand Up @@ -384,6 +393,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>mRootPath</tabstop>
Expand Down
24 changes: 20 additions & 4 deletions src/ui/editorwidgets/qgsphotoconfigdlgbase.ui
Expand Up @@ -41,7 +41,13 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbWidgetWidth">
<widget class="QgsSpinBox" name="sbWidgetWidth">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
Expand All @@ -55,9 +61,12 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="sbWidgetHeight">
<widget class="QgsSpinBox" name="sbWidgetHeight">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string/>
<string> px</string>
</property>
<property name="prefix">
<string/>
Expand All @@ -70,7 +79,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Specify the size of the preview. If you leave it set to 0, an optimal size will be estimated.</string>
<string>Specify the size of the preview. If you leave it set to &lt;i&gt;Auto&lt;/i&gt;, an optimal size will be calculated.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand All @@ -82,6 +91,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
22 changes: 19 additions & 3 deletions src/ui/editorwidgets/qgswebviewconfigdlgbase.ui
Expand Up @@ -42,7 +42,13 @@
</spacer>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbWidgetWidth">
<widget class="QgsSpinBox" name="sbWidgetWidth">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
Expand All @@ -56,9 +62,12 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="sbWidgetHeight">
<widget class="QgsSpinBox" name="sbWidgetHeight">
<property name="specialValueText">
<string>Auto</string>
</property>
<property name="suffix">
<string/>
<string> px</string>
</property>
<property name="prefix">
<string/>
Expand All @@ -83,6 +92,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

0 comments on commit e571885

Please sign in to comment.