UI: Add splitter to main window

Allows adjusting the size of the bottom section of the main window
master
jp9000 2016-01-09 14:20:46 -08:00
parent 9cded466dc
commit d7d5e55d2c
2 changed files with 468 additions and 475 deletions

View File

@ -7,8 +7,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>920</width> <width>957</width>
<height>700</height> <height>724</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -34,312 +34,101 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="OBSBasicPreview" name="preview" native="true"> <widget class="QSplitter" name="mainSplitter">
<property name="sizePolicy"> <property name="orientation">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <enum>Qt::Vertical</enum>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="childrenCollapsible">
<size> <bool>false</bool>
<width>32</width>
<height>32</height>
</size>
</property> </property>
<property name="focusPolicy"> <widget class="QWidget" name="verticalLayoutWidget_7">
<enum>Qt::ClickFocus</enum> <layout class="QVBoxLayout" name="verticalLayout_14">
</property> <item>
<property name="contextMenuPolicy"> <widget class="OBSBasicPreview" name="preview" native="true">
<enum>Qt::CustomContextMenu</enum>
</property>
<addaction name="actionRemoveSource"/>
</widget>
</item>
<item>
<widget class="QLabel" name="previewDisabledLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="text">
<string>Basic.Main.PreviewDisabled</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QWidget" name="controlsContainer" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>720</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>165</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<item row="0" column="3">
<spacer name="mixadvHSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="sourcesLabel">
<property name="text">
<string>Basic.Main.Sources</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="scenesLabel">
<property name="text">
<string>Basic.Main.Scenes</string>
</property>
</widget>
</item>
<item row="1" column="3">
<layout class="QVBoxLayout" name="buttonsVLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="streamButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Basic.Main.StartStreaming</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="recordButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Basic.Main.StartRecording</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="settingsButton">
<property name="text">
<string>Settings</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="exitButton">
<property name="text">
<string>Exit</string>
</property>
</widget>
</item>
<item>
<spacer name="expVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="mixadvHLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="mixerLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Mixer</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="advAudioProps">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="obs.qrc">
<normaloff>:/res/images/configuration21_16.png</normaloff>:/res/images/configuration21_16.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID" stdset="0">
<string notr="true">configIconSmall</string>
</property>
</widget>
</item>
<item>
<spacer name="mixadvHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="2">
<widget class="VScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="volumeWidgets">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>209</width>
<height>16</height>
</rect>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <property name="minimumSize">
<property name="spacing"> <size>
<number>0</number> <width>32</width>
</property> <height>32</height>
<property name="leftMargin"> </size>
<number>0</number> </property>
</property> <property name="focusPolicy">
<property name="topMargin"> <enum>Qt::ClickFocus</enum>
<number>0</number> </property>
</property> <property name="contextMenuPolicy">
<property name="rightMargin"> <enum>Qt::CustomContextMenu</enum>
<number>0</number> </property>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget> </widget>
</widget> </item>
</item> <item>
<item row="1" column="1"> <widget class="QLabel" name="previewDisabledLabel">
<layout class="QVBoxLayout" name="sourcesVLayout"> <property name="sizePolicy">
<property name="spacing"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<number>0</number> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
<item> </sizepolicy>
<widget class="QFrame" name="sourcesFrame"> </property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="text">
<string>Basic.Main.PreviewDisabled</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="gridLayoutWidget_2">
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="2">
<widget class="VScrollArea" name="scrollArea">
<property name="minimumSize">
<size>
<width>220</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="volumeWidgets">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>242</width>
<height>16</height>
</rect>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <layout class="QVBoxLayout" name="verticalLayout_18">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -355,20 +144,74 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> </layout>
<widget class="SourceListWidget" name="sources"> </widget>
<property name="sizePolicy"> </widget>
<sizepolicy hsizetype="Ignored" vsizetype="Expanding"> </item>
<horstretch>0</horstretch> <item row="1" column="0">
<verstretch>0</verstretch> <layout class="QVBoxLayout" name="scenesVLayout">
</sizepolicy> <property name="spacing">
</property> <number>0</number>
<property name="contextMenuPolicy"> </property>
<enum>Qt::CustomContextMenu</enum> <item>
</property> <widget class="QFrame" name="scenesFrame">
<property name="frameShape"> <property name="sizePolicy">
<enum>QFrame::NoFrame</enum> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
</property> <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>260</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QListWidget" name="scenes">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="showDropIndicator" stdset="0"> <property name="showDropIndicator" stdset="0">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -378,177 +221,303 @@
<property name="dragDropMode"> <property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum> <enum>QAbstractItemView::InternalMove</enum>
</property> </property>
<property name="selectionMode"> <property name="defaultDropAction">
<enum>QAbstractItemView::ExtendedSelection</enum> <enum>Qt::TargetMoveAction</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolBar" name="scenesToolbar">
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<addaction name="actionAddScene"/>
<addaction name="actionRemoveScene"/>
<addaction name="separator"/>
<addaction name="actionSceneUp"/>
<addaction name="actionSceneDown"/>
</widget>
</item>
<item>
<spacer name="scenesFixedSizeHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QLabel" name="sourcesLabel">
<property name="text">
<string>Basic.Main.Sources</string>
</property>
</widget>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="mixadvHLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QLabel" name="mixerLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Mixer</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="advAudioProps">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="obs.qrc">
<normaloff>:/res/images/configuration21_16.png</normaloff>:/res/images/configuration21_16.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID" stdset="0">
<string notr="true">configIconSmall</string>
</property>
</widget>
</item>
<item>
<spacer name="mixadvHSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="sourcesVLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="sourcesFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>260</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="SourceListWidget" name="sources">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="showDropIndicator" stdset="0">
<bool>true</bool>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
</property> </property>
<property name="defaultDropAction"> <property name="defaultDropAction">
<enum>Qt::TargetMoveAction</enum> <enum>Qt::TargetMoveAction</enum>
</property> </property>
<addaction name="actionRemoveSource"/> <property name="selectionMode">
</widget> <enum>QAbstractItemView::ExtendedSelection</enum>
</item> </property>
<item> </widget>
<widget class="QToolBar" name="sourcesToolbar"> </item>
<property name="iconSize"> <item>
<size> <widget class="QToolBar" name="sourcesToolbar">
<width>16</width> <property name="iconSize">
<height>16</height> <size>
</size> <width>16</width>
</property> <height>16</height>
<property name="floatable"> </size>
<bool>false</bool> </property>
</property> <property name="floatable">
<addaction name="actionAddSource"/> <bool>false</bool>
<addaction name="actionRemoveSource"/> </property>
<addaction name="actionSourceProperties"/> <addaction name="actionAddSource"/>
<addaction name="separator"/> <addaction name="actionRemoveSource"/>
<addaction name="actionSourceUp"/> <addaction name="actionSourceProperties"/>
<addaction name="actionSourceDown"/> <addaction name="separator"/>
</widget> <addaction name="actionSourceUp"/>
</item> <addaction name="actionSourceDown"/>
<item> </widget>
<spacer name="sourcesFixedSizeHSpacer"> </item>
<property name="orientation"> <item>
<enum>Qt::Horizontal</enum> <spacer name="sourcesFixedSizeHSpacer">
</property> <property name="orientation">
<property name="sizeType"> <enum>Qt::Horizontal</enum>
<enum>QSizePolicy::Fixed</enum> </property>
</property> <property name="sizeType">
<property name="sizeHint" stdset="0"> <enum>QSizePolicy::Fixed</enum>
<size> </property>
<width>150</width> <property name="sizeHint" stdset="0">
<height>0</height> <size>
</size> <width>150</width>
</property> <height>0</height>
</spacer> </size>
</item> </property>
</layout> </spacer>
</widget> </item>
</item> </layout>
</layout> </widget>
</item> </item>
<item row="1" column="0"> </layout>
<layout class="QVBoxLayout" name="scenesVLayout"> </item>
<property name="spacing"> <item row="0" column="0">
<number>0</number> <widget class="QLabel" name="scenesLabel">
</property> <property name="text">
<item> <string>Basic.Main.Scenes</string>
<widget class="QFrame" name="scenesFrame"> </property>
<property name="sizePolicy"> </widget>
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> </item>
<horstretch>0</horstretch> <item row="1" column="3">
<verstretch>0</verstretch> <layout class="QVBoxLayout" name="buttonsVLayout">
</sizepolicy> <property name="spacing">
</property> <number>2</number>
<property name="minimumSize"> </property>
<size> <item>
<width>160</width> <widget class="QPushButton" name="streamButton">
<height>0</height> <property name="enabled">
</size> <bool>true</bool>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property> </property>
<property name="leftMargin"> <property name="text">
<number>0</number> <string>Basic.Main.StartStreaming</string>
</property> </property>
<property name="topMargin"> <property name="checkable">
<number>0</number> <bool>false</bool>
</property> </property>
<property name="rightMargin"> </widget>
<number>0</number> </item>
<item>
<widget class="QPushButton" name="recordButton">
<property name="enabled">
<bool>true</bool>
</property> </property>
<property name="bottomMargin"> <property name="text">
<number>0</number> <string>Basic.Main.StartRecording</string>
</property> </property>
<item> </widget>
<widget class="QListWidget" name="scenes"> </item>
<property name="enabled"> <item>
<bool>true</bool> <widget class="QPushButton" name="settingsButton">
</property> <property name="text">
<property name="sizePolicy"> <string>Settings</string>
<sizepolicy hsizetype="Ignored" vsizetype="Expanding"> </property>
<horstretch>0</horstretch> </widget>
<verstretch>0</verstretch> </item>
</sizepolicy> <item>
</property> <widget class="QPushButton" name="exitButton">
<property name="contextMenuPolicy"> <property name="text">
<enum>Qt::CustomContextMenu</enum> <string>Exit</string>
</property> </property>
<property name="frameShape"> </widget>
<enum>QFrame::NoFrame</enum> </item>
</property> <item>
<property name="frameShadow"> <spacer name="expVSpacer">
<enum>QFrame::Plain</enum> <property name="orientation">
</property> <enum>Qt::Vertical</enum>
<property name="showDropIndicator" stdset="0"> </property>
<bool>true</bool> <property name="sizeHint" stdset="0">
</property> <size>
<property name="dragEnabled"> <width>0</width>
<bool>true</bool> <height>0</height>
</property> </size>
<property name="dragDropMode"> </property>
<enum>QAbstractItemView::InternalMove</enum> </spacer>
</property> </item>
<property name="defaultDropAction"> </layout>
<enum>Qt::TargetMoveAction</enum> </item>
</property> </layout>
<addaction name="actionRemoveScene"/> </widget>
</widget>
</item>
<item>
<widget class="QToolBar" name="scenesToolbar">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<addaction name="actionAddScene"/>
<addaction name="actionRemoveScene"/>
<addaction name="separator"/>
<addaction name="actionSceneUp"/>
<addaction name="actionSceneDown"/>
</widget>
</item>
<item>
<spacer name="scenesFixedSizeHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -558,7 +527,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>920</width> <width>957</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -1058,12 +1027,12 @@
<slot>close()</slot> <slot>close()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>697</x> <x>838</x>
<y>615</y> <y>272</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>463</x> <x>902</x>
<y>351</y> <y>-10</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>

View File

@ -925,6 +925,25 @@ void OBSBasic::OBSInit()
connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDisplay); connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDisplay);
show(); show();
QList<int> defSizes;
int top = config_get_int(App()->GlobalConfig(), "BasicWindow",
"splitterTop");
int bottom = config_get_int(App()->GlobalConfig(), "BasicWindow",
"splitterBottom");
if (!top || !bottom) {
defSizes = ui->mainSplitter->sizes();
int total = defSizes[0] + defSizes[1];
defSizes[0] = total * 75 / 100;
defSizes[1] = total - defSizes[0];
} else {
defSizes.push_back(top);
defSizes.push_back(bottom);
}
ui->mainSplitter->setSizes(defSizes);
} }
void OBSBasic::InitHotkeys() void OBSBasic::InitHotkeys()
@ -1153,6 +1172,7 @@ OBSBasic::~OBSBasic()
LIBOBS_API_VER); LIBOBS_API_VER);
QRect lastGeom = normalGeometry(); QRect lastGeom = normalGeometry();
QList<int> splitterSizes = ui->mainSplitter->sizes();
config_set_int(App()->GlobalConfig(), "BasicWindow", "cx", config_set_int(App()->GlobalConfig(), "BasicWindow", "cx",
lastGeom.width()); lastGeom.width());
@ -1162,6 +1182,10 @@ OBSBasic::~OBSBasic()
lastGeom.x()); lastGeom.x());
config_set_int(App()->GlobalConfig(), "BasicWindow", "posy", config_set_int(App()->GlobalConfig(), "BasicWindow", "posy",
lastGeom.y()); lastGeom.y());
config_set_int(App()->GlobalConfig(), "BasicWindow", "splitterTop",
splitterSizes[0]);
config_set_int(App()->GlobalConfig(), "BasicWindow", "splitterBottom",
splitterSizes[1]);
config_set_bool(App()->GlobalConfig(), "BasicWindow", "PreviewEnabled", config_set_bool(App()->GlobalConfig(), "BasicWindow", "PreviewEnabled",
previewEnabled); previewEnabled);
config_save_safe(App()->GlobalConfig(), "tmp", nullptr); config_save_safe(App()->GlobalConfig(), "tmp", nullptr);