Improve layouts of settings pages

Especially prevent certain elements from expanding (the
additional space between the elements looks weird).
This commit is contained in:
Martchus 2020-01-11 20:53:07 +01:00
parent 2d704cf765
commit addba5a87c
8 changed files with 80 additions and 36 deletions

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>Plasmoid::AppearanceOptionPage</class> <class>Plasmoid::AppearanceOptionPage</class>
<widget class="QWidget" name="Plasmoid::AppearanceOptionPage"> <widget class="QWidget" name="Plasmoid::AppearanceOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Appearance</string> <string>Appearance</string>
</property> </property>

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>QtGui::AppearanceOptionPage</class> <class>QtGui::AppearanceOptionPage</class>
<widget class="QWidget" name="QtGui::AppearanceOptionPage"> <widget class="QWidget" name="QtGui::AppearanceOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Appearance</string> <string>Appearance</string>
</property> </property>

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>QtGui::AutostartOptionPage</class> <class>QtGui::AutostartOptionPage</class>
<widget class="QWidget" name="QtGui::AutostartOptionPage"> <widget class="QWidget" name="QtGui::AutostartOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Autostart</string> <string>Autostart</string>
</property> </property>

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>QtGui::ConnectionOptionPage</class> <class>QtGui::ConnectionOptionPage</class>
<widget class="QWidget" name="QtGui::ConnectionOptionPage"> <widget class="QWidget" name="QtGui::ConnectionOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Connection</string> <string>Connection</string>
</property> </property>
@ -75,7 +81,8 @@
<string>Move currently selected configuration down</string> <string>Move currently selected configuration down</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-down"/> <iconset theme="go-down">
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -91,7 +98,8 @@
<string>Move currently selected configuration up</string> <string>Move currently selected configuration up</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-up"/> <iconset theme="go-up">
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -448,17 +456,17 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>QtUtilities::ClearLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">qtutilities/widgets/clearlineedit.h</header>
</customwidget>
<customwidget> <customwidget>
<class>QtUtilities::PathSelection</class> <class>QtUtilities::PathSelection</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">qtutilities/widgets/pathselection.h</header> <header location="global">qtutilities/widgets/pathselection.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QtUtilities::ClearLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">qtutilities/widgets/clearlineedit.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../resources/syncthingwidgetsicons.qrc"/> <include location="../resources/syncthingwidgetsicons.qrc"/>

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>QtGui::IconsOptionPage</class> <class>QtGui::IconsOptionPage</class>
<widget class="QWidget" name="QtGui::IconsOptionPage"> <widget class="QWidget" name="QtGui::IconsOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Icons</string> <string>Icons</string>
</property> </property>
@ -11,10 +17,21 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QLabel" name="contextLabel"/> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0">
</item> <item>
<item> <widget class="QLabel" name="contextLabel">
<widget class="QCheckBox" name="contextCheckBox"/> <property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="contextCheckBox"/>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="dragAndDropInfoLabel"> <widget class="QLabel" name="dragAndDropInfoLabel">
@ -115,7 +132,8 @@
<string>Use preset</string> <string>Use preset</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="color-profile"/> <iconset theme="color-profile">
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -180,17 +180,17 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>QtUtilities::ClearLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">qtutilities/widgets/clearlineedit.h</header>
</customwidget>
<customwidget> <customwidget>
<class>QtUtilities::PathSelection</class> <class>QtUtilities::PathSelection</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">qtutilities/widgets/pathselection.h</header> <header location="global">qtutilities/widgets/pathselection.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QtUtilities::ClearLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">qtutilities/widgets/clearlineedit.h</header>
</customwidget>
<customwidget> <customwidget>
<class>QtUtilities::ClearPlainTextEdit</class> <class>QtUtilities::ClearPlainTextEdit</class>
<extends>QPlainTextEdit</extends> <extends>QPlainTextEdit</extends>

View File

@ -37,6 +37,12 @@
</item> </item>
<item> <item>
<widget class="QWidget" name="systemdFormWidget" native="true"> <widget class="QWidget" name="systemdFormWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>30</number> <number>30</number>
@ -66,6 +72,13 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QtUtilities::ClearLineEdit" name="syncthingUnitLineEdit"/> <widget class="QtUtilities::ClearLineEdit" name="syncthingUnitLineEdit"/>
</item> </item>
<item row="1" column="1">
<widget class="QCheckBox" name="systemUnitCheckBox">
<property name="text">
<string>System unit</string>
</property>
</widget>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="descriptionLabel"> <widget class="QLabel" name="descriptionLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -74,12 +87,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Description</string> <string>Description</string>
</property> </property>
@ -89,12 +96,6 @@
<layout class="QHBoxLayout" name="descriptionHorizontalLayout"> <layout class="QHBoxLayout" name="descriptionHorizontalLayout">
<item> <item>
<widget class="QLabel" name="descriptionValueLabel"> <widget class="QLabel" name="descriptionValueLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
@ -286,13 +287,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1">
<widget class="QCheckBox" name="systemUnitCheckBox">
<property name="text">
<string>System unit</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -2,6 +2,12 @@
<ui version="4.0"> <ui version="4.0">
<class>QtGui::WebViewOptionPage</class> <class>QtGui::WebViewOptionPage</class>
<widget class="QWidget" name="QtGui::WebViewOptionPage"> <widget class="QWidget" name="QtGui::WebViewOptionPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>General</string> <string>General</string>
</property> </property>