[effects/slide] Use FormLayout in KCM

Summary:
HBoxLayout was a bad choice for label-spinbox pairs. Use appropriate
layout(FormLayout) for such things.

Test Plan: The KCM still looks the same.

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13422
This commit is contained in:
Vlad Zagorodniy 2018-06-07 23:55:07 +03:00
parent 1193e3c369
commit 1a1845b7d7

View file

@ -12,27 +12,15 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="layout_Duration"> <layout class="QFormLayout" name="layout_Duration">
<item> <item row="0" column="0">
<widget class="QLabel" name="label_Duration"> <widget class="QLabel" name="label_Duration">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>D&amp;uration:</string> <string>Duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_Duration</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QSpinBox" name="kcfg_Duration"> <widget class="QSpinBox" name="kcfg_Duration">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -40,12 +28,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="specialValueText"> <property name="specialValueText">
<string extracomment="Duration of the slide animation.">Default</string> <string extracomment="Duration of the slide animation.">Default</string>
</property> </property>
@ -63,36 +45,19 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupbox_Gaps"> <widget class="QGroupBox" name="groupBox_Gaps">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title"> <property name="title">
<string>Gap between desktops</string> <string>Gap between desktops</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QFormLayout" name="formLayout_2">
<item> <item row="0" column="0">
<layout class="QHBoxLayout" name="layout_HorizontalGap">
<item>
<widget class="QLabel" name="label_HorizontalGap"> <widget class="QLabel" name="label_HorizontalGap">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Hori&amp;zontal:</string> <string>Horizontal:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_HorizontalGap</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QSpinBox" name="kcfg_HorizontalGap"> <widget class="QSpinBox" name="kcfg_HorizontalGap">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -100,9 +65,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="suffix">
<string/>
</property>
<property name="maximum"> <property name="maximum">
<number>1000</number> <number>1000</number>
</property> </property>
@ -111,30 +73,14 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</item>
<item>
<layout class="QHBoxLayout" name="layout_VerticalGap">
<item>
<widget class="QLabel" name="label_VerticalGap"> <widget class="QLabel" name="label_VerticalGap">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Ver&amp;tical:</string> <string>Vertical:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_VerticalGap</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="QSpinBox" name="kcfg_VerticalGap"> <widget class="QSpinBox" name="kcfg_VerticalGap">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -151,8 +97,6 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>