UI: Adjust minimum size of source toolbars

Sets a minimum size on the source toolbar itself to prevent shrinking the main window too small for it to be useable in some cases.

Also sets some sane limits on the toolbars with dropdown menus and the image source toolbar filepath
This commit is contained in:
Warchamp7 2021-08-24 23:28:07 -04:00 committed by Jim
parent 8f97e32227
commit 6e566f9b23
5 changed files with 73 additions and 19 deletions

View File

@ -421,7 +421,6 @@ void GameCaptureToolbar::UpdateWindowVisibility()
bool is_window = (mode == "window");
ui->windowLabel->setVisible(is_window);
ui->window->setVisible(is_window);
ui->empty->setVisible(!is_window);
}
void GameCaptureToolbar::on_mode_currentIndexChanged(int idx)

View File

@ -205,7 +205,7 @@
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>800</width>
<height>30</height>
</size>
</property>
@ -293,13 +293,13 @@
</property>
<property name="minimumSize">
<size>
<width>250</width>
<width>160</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<width>160</width>
<height>22</height>
</size>
</property>
@ -1001,7 +1001,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>94</width>
<width>67</width>
<height>16</height>
</rect>
</property>

View File

@ -25,7 +25,7 @@
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
@ -44,7 +44,7 @@
<item>
<widget class="QLabel" name="deviceLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -77,6 +77,12 @@
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>600</width>
<height>16777215</height>
</size>
</property>
<property name="currentText">
<string notr="true"/>
</property>
@ -87,6 +93,12 @@
</item>
<item>
<widget class="QPushButton" name="activateButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
@ -103,9 +115,12 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>

View File

@ -25,7 +25,7 @@
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,4,0,5,0">
<property name="leftMargin">
<number>0</number>
</property>
@ -62,12 +62,24 @@
</item>
<item>
<widget class="QComboBox" name="mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>150</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>16777215</height>
</size>
</property>
<property name="currentText">
<string notr="true"/>
</property>
@ -105,10 +117,16 @@
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>150</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>600</width>
<height>16777215</height>
</size>
</property>
<property name="currentText">
<string notr="true"/>
</property>
@ -118,14 +136,17 @@
</widget>
</item>
<item>
<widget class="QFrame" name="empty">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<spacer name="empty">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>

View File

@ -25,7 +25,7 @@
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,0,0">
<property name="leftMargin">
<number>0</number>
</property>
@ -68,6 +68,12 @@
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
@ -95,6 +101,19 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>