Commit 1a1845b7 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent 1193e3c3
......@@ -12,27 +12,15 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_Duration">
<item>
<layout class="QFormLayout" name="layout_Duration">
<item row="0" column="0">
<widget class="QLabel" name="label_Duration">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>D&amp;uration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_Duration</cstring>
<string>Duration:</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_Duration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
......@@ -40,12 +28,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="specialValueText">
<string extracomment="Duration of the slide animation.">Default</string>
</property>
......@@ -63,94 +45,56 @@
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupbox_Gaps">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QGroupBox" name="groupBox_Gaps">
<property name="title">
<string>Gap between desktops</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="layout_HorizontalGap">
<item>
<widget class="QLabel" name="label_HorizontalGap">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Hori&amp;zontal:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_HorizontalGap</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="kcfg_HorizontalGap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_HorizontalGap">
<property name="text">
<string>Horizontal:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_HorizontalGap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_VerticalGap">
<property name="text">
<string>Vertical:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_VerticalGap">
<item>
<widget class="QLabel" name="label_VerticalGap">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Ver&amp;tical:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_VerticalGap</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="kcfg_VerticalGap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
<item row="1" column="1">
<widget class="QSpinBox" name="kcfg_VerticalGap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
</layout>
</widget>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment