Jelajahi Sumber

UI: Clean up Transform form markup

Fixes some QWidgets that Qt Creator tries to clobber. As a result, there is a new spacer added now to ensure the controls remain grouped at the top of the window.
Warchamp7 4 tahun lalu
induk
melakukan
2233e3450d
1 mengubah file dengan 84 tambahan dan 61 penghapusan
  1. 84 61
      UI/forms/OBSBasicTransform.ui

+ 84 - 61
UI/forms/OBSBasicTransform.ui

@@ -7,13 +7,13 @@
     <x>0</x>
     <y>0</y>
     <width>564</width>
-    <height>241</height>
+    <height>313</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Basic.TransformWindow</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
+  <layout class="QVBoxLayout" name="verticalLayout" stretch="0,5,0">
    <item>
     <layout class="QFormLayout" name="formLayout">
      <property name="fieldGrowthPolicy">
@@ -36,10 +36,10 @@
          <height>0</height>
         </size>
        </property>
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Position</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Position</string>
        </property>
        <property name="alignment">
@@ -48,7 +48,7 @@
       </widget>
      </item>
      <item row="0" column="1">
-      <widget class="QWidget" name="widget">
+      <widget class="QFrame" name="widget">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
          <horstretch>0</horstretch>
@@ -76,6 +76,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.PositionX</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -85,9 +88,6 @@
           <property name="maximum">
            <double>90001.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.PositionX</string>
-          </property>
          </widget>
         </item>
         <item>
@@ -98,6 +98,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.PositionY</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -107,9 +110,6 @@
           <property name="maximum">
            <double>90001.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.PositionY</string>
-          </property>
          </widget>
         </item>
        </layout>
@@ -117,10 +117,10 @@
      </item>
      <item row="1" column="0">
       <widget class="QLabel" name="label_2">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Rotation</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Rotation</string>
        </property>
       </widget>
@@ -139,6 +139,9 @@
          <height>0</height>
         </size>
        </property>
+       <property name="accessibleName">
+        <string>Basic.TransformWindow.Rotation</string>
+       </property>
        <property name="minimum">
         <double>-360.000000000000000</double>
        </property>
@@ -148,23 +151,20 @@
        <property name="singleStep">
         <double>0.100000000000000</double>
        </property>
-       <property name="accessibleName">
-        <string>Basic.TransformWindow.Rotation</string>
-       </property>
       </widget>
      </item>
      <item row="2" column="0">
       <widget class="QLabel" name="label_3">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Size</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Size</string>
        </property>
       </widget>
      </item>
      <item row="2" column="1">
-      <widget class="QWidget" name="widget_2">
+      <widget class="QFrame" name="widget_2">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
          <horstretch>0</horstretch>
@@ -192,6 +192,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.Width</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -204,9 +207,6 @@
           <property name="singleStep">
            <double>1.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.Width</string>
-          </property>
          </widget>
         </item>
         <item>
@@ -217,6 +217,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.Height</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -229,9 +232,6 @@
           <property name="singleStep">
            <double>1.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.Height</string>
-          </property>
          </widget>
         </item>
        </layout>
@@ -239,22 +239,22 @@
      </item>
      <item row="3" column="0">
       <widget class="QLabel" name="label_4">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Alignment</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Alignment</string>
        </property>
       </widget>
      </item>
      <item row="3" column="1">
       <widget class="QComboBox" name="align">
-       <property name="currentText">
-        <string>Basic.TransformWindow.Alignment.TopLeft</string>
-       </property>
        <property name="accessibleName">
         <string>Basic.TransformWindow.Alignment</string>
        </property>
+       <property name="currentText">
+        <string>Basic.TransformWindow.Alignment.TopLeft</string>
+       </property>
        <item>
         <property name="text">
          <string>Basic.TransformWindow.Alignment.TopLeft</string>
@@ -317,10 +317,10 @@
      </item>
      <item row="5" column="0">
       <widget class="QLabel" name="label_5">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.BoundsType</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.BoundsType</string>
        </property>
       </widget>
@@ -369,10 +369,10 @@
      </item>
      <item row="6" column="0">
       <widget class="QLabel" name="label_6">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.BoundsAlignment</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.BoundsAlignment</string>
        </property>
       </widget>
@@ -382,12 +382,12 @@
        <property name="enabled">
         <bool>false</bool>
        </property>
-       <property name="currentText">
-        <string>Basic.TransformWindow.Alignment.TopLeft</string>
-       </property>
        <property name="accessibleName">
         <string>Basic.TransformWindow.BoundsAlignment</string>
        </property>
+       <property name="currentText">
+        <string>Basic.TransformWindow.Alignment.TopLeft</string>
+       </property>
        <item>
         <property name="text">
          <string>Basic.TransformWindow.Alignment.TopLeft</string>
@@ -437,16 +437,16 @@
      </item>
      <item row="7" column="0">
       <widget class="QLabel" name="label_7">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Bounds</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Bounds</string>
        </property>
       </widget>
      </item>
      <item row="7" column="1">
-      <widget class="QWidget" name="widget_3">
+      <widget class="QFrame" name="widget_3">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
          <horstretch>0</horstretch>
@@ -477,6 +477,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.BoundsWidth</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -486,9 +489,6 @@
           <property name="maximum">
            <double>90001.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.BoundsWidth</string>
-          </property>
          </widget>
         </item>
         <item>
@@ -502,6 +502,9 @@
             <height>0</height>
            </size>
           </property>
+          <property name="accessibleName">
+           <string>Basic.TransformWindow.BoundsHeight</string>
+          </property>
           <property name="decimals">
            <number>4</number>
           </property>
@@ -511,9 +514,6 @@
           <property name="maximum">
            <double>90001.000000000000000</double>
           </property>
-          <property name="accessibleName">
-           <string>Basic.TransformWindow.BoundsHeight</string>
-          </property>
          </widget>
         </item>
        </layout>
@@ -534,10 +534,10 @@
      </item>
      <item row="9" column="0">
       <widget class="QLabel" name="label_8">
-       <property name="text">
+       <property name="accessibleName">
         <string>Basic.TransformWindow.Crop</string>
        </property>
-       <property name="accessibleName">
+       <property name="text">
         <string>Basic.TransformWindow.Crop</string>
        </property>
       </widget>
@@ -558,12 +558,12 @@
            <height>0</height>
           </size>
          </property>
-         <property name="maximum">
-          <number>100000</number>
-         </property>
          <property name="accessibleName">
           <string>Basic.TransformWindow.CropLeft</string>
          </property>
+         <property name="maximum">
+          <number>100000</number>
+         </property>
         </widget>
        </item>
        <item row="0" column="3">
@@ -580,12 +580,12 @@
            <height>0</height>
           </size>
          </property>
-         <property name="maximum">
-          <number>100000</number>
-         </property>
          <property name="accessibleName">
           <string>Basic.TransformWindow.CropRight</string>
          </property>
+         <property name="maximum">
+          <number>100000</number>
+         </property>
         </widget>
        </item>
        <item row="0" column="0">
@@ -628,12 +628,12 @@
            <height>0</height>
           </size>
          </property>
-         <property name="maximum">
-          <number>100000</number>
-         </property>
          <property name="accessibleName">
           <string>Basic.TransformWindow.CropTop</string>
          </property>
+         <property name="maximum">
+          <number>100000</number>
+         </property>
         </widget>
        </item>
        <item row="1" column="3">
@@ -650,12 +650,12 @@
            <height>0</height>
           </size>
          </property>
-         <property name="maximum">
-          <number>100000</number>
-         </property>
          <property name="accessibleName">
           <string>Basic.TransformWindow.CropBottom</string>
          </property>
+         <property name="maximum">
+          <number>100000</number>
+         </property>
         </widget>
        </item>
        <item row="1" column="0">
@@ -701,10 +701,23 @@
      </item>
     </layout>
    </item>
+   <item>
+    <spacer name="transformSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>0</width>
+       <height>10</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
    <item>
     <widget class="QDialogButtonBox" name="buttonBox">
      <property name="standardButtons">
-      <set>QDialogButtonBox::Reset|QDialogButtonBox::Close</set>
+      <set>QDialogButtonBox::Close|QDialogButtonBox::Reset</set>
      </property>
     </widget>
    </item>
@@ -717,6 +730,16 @@
    <signal>rejected()</signal>
    <receiver>OBSBasicTransform</receiver>
    <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+   </hints>
   </connection>
  </connections>
 </ui>