浏览代码

UI: Change the Source Toolbar to not be fixed size

This is part of a larger pass I'll be making over the UI to make it behave better with qss

The Source Toolbar previously had a fixed height that made styling it difficult. It now takes up the minimum amount of space it needs, but can grow to accommodate larger buttons, padding, etc.
Warchamp7 4 年之前
父节点
当前提交
dca7fadf51

+ 1 - 31
UI/forms/OBSBasic.ui

@@ -209,12 +209,6 @@
         <height>30</height>
        </size>
       </property>
-      <property name="maximumSize">
-       <size>
-        <width>16777215</width>
-        <height>30</height>
-       </size>
-      </property>
       <layout class="QHBoxLayout" name="horizontalLayout9">
        <property name="spacing">
         <number>6</number>
@@ -310,12 +304,6 @@
               <height>22</height>
              </size>
             </property>
-            <property name="maximumSize">
-             <size>
-              <width>16777215</width>
-              <height>22</height>
-             </size>
-            </property>
             <property name="toolTip">
              <string>Properties</string>
             </property>
@@ -342,12 +330,6 @@
               <height>22</height>
              </size>
             </property>
-            <property name="maximumSize">
-             <size>
-              <width>16777215</width>
-              <height>22</height>
-             </size>
-            </property>
             <property name="toolTip">
              <string>Filters</string>
             </property>
@@ -374,12 +356,6 @@
               <height>22</height>
              </size>
             </property>
-            <property name="maximumSize">
-             <size>
-              <width>16777215</width>
-              <height>22</height>
-             </size>
-            </property>
             <property name="text">
              <string>Interact</string>
             </property>
@@ -408,7 +384,7 @@
        <item>
         <widget class="QFrame" name="emptySpace">
          <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
@@ -419,12 +395,6 @@
            <height>22</height>
           </size>
          </property>
-         <property name="maximumSize">
-          <size>
-           <width>16777215</width>
-           <height>22</height>
-          </size>
-         </property>
          <layout class="QHBoxLayout" name="horizontalLayout_6">
           <property name="spacing">
            <number>0</number>

+ 1 - 13
UI/forms/source-toolbar/browser-source-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -52,12 +46,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>RefreshBrowser</string>
      </property>

+ 1 - 19
UI/forms/source-toolbar/color-source-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -58,12 +52,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">color here</string>
      </property>
@@ -80,12 +68,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>Basic.PropertiesWindow.SelectColor</string>
      </property>

+ 1 - 25
UI/forms/source-toolbar/device-select-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -61,12 +55,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">Device</string>
      </property>
@@ -89,12 +77,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="currentText">
       <string notr="true"/>
      </property>
@@ -111,12 +93,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">Activate</string>
      </property>

+ 1 - 31
UI/forms/source-toolbar/game-capture-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>24</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -58,12 +52,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">Mode</string>
      </property>
@@ -80,12 +68,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="currentText">
       <string notr="true"/>
      </property>
@@ -105,12 +87,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">Window</string>
      </property>
@@ -133,12 +109,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="currentText">
       <string notr="true"/>
      </property>

+ 1 - 25
UI/forms/source-toolbar/image-source-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -58,12 +52,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true">Image File</string>
      </property>
@@ -80,12 +68,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string notr="true"/>
      </property>
@@ -108,12 +90,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>Browse</string>
      </property>

+ 1 - 55
UI/forms/source-toolbar/media-controls.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -61,12 +55,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>22</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="toolTip">
       <string>ContextBar.MediaControls.RestartMedia</string>
      </property>
@@ -121,12 +109,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>22</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="toolTip">
       <string>ContextBar.MediaControls.PlaylistPrevious</string>
      </property>
@@ -165,12 +147,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>22</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="toolTip">
       <string>ContextBar.MediaControls.StopMedia</string>
      </property>
@@ -209,12 +185,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>22</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="toolTip">
       <string>ContextBar.MediaControls.PlaylistNext</string>
      </property>
@@ -247,12 +217,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="accessibleName">
       <string>ContextBar.MediaControls.BlindSeek</string>
      </property>
@@ -297,12 +261,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>--:--:--</string>
      </property>
@@ -338,12 +296,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>/</string>
      </property>
@@ -379,12 +331,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>--:--:--</string>
      </property>

+ 1 - 25
UI/forms/source-toolbar/text-source-toolbar.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
@@ -22,12 +22,6 @@
     <height>22</height>
    </size>
   </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>22</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
@@ -52,12 +46,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>Basic.PropertiesWindow.SelectFont</string>
      </property>
@@ -71,12 +59,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
      <property name="text">
       <string>Basic.PropertiesWindow.SelectColor</string>
      </property>
@@ -100,12 +82,6 @@
        <height>22</height>
       </size>
      </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>22</height>
-      </size>
-     </property>
     </widget>
    </item>
   </layout>