Adjust the way properties view UI displays

It didn't really look very nice in most cases and the controls were
always compacted, doing this makes it look a bit better.

Also change it so the properties window shows the properties on the
bottom below the source rather than to the right, seeing as in most
cases the source has a greater width than height, and it feels just a
little bit better to look at (thought that's just my opinion).

Controls still stretch really far sometimes though, I wonder what should
be done about that to be honest.  Maybe prevent it from scrolling to the
right?
This commit is contained in:
jp9000 2014-04-24 21:12:23 -07:00
parent 89e02ca73c
commit fbbf274c51
4 changed files with 29 additions and 15 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1072</width>
<height>441</height>
<width>664</width>
<height>562</height>
</rect>
</property>
<property name="windowTitle">
@ -16,11 +16,11 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="OBSQTDisplay" name="preview" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>

View File

@ -86,7 +86,7 @@
<item>
<widget class="QStackedWidget" name="settingsPages">
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<widget class="QWidget" name="generalPage">
<layout class="QFormLayout" name="formLayout_2">
@ -242,6 +242,12 @@
</property>
<item alignment="Qt::AlignTop">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QFormLayout" name="formLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_16">
@ -264,6 +270,12 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@ -972,12 +984,12 @@
<slot>setCurrentIndex(int)</slot>
<hints>
<hint type="sourcelabel">
<x>329</x>
<y>168</y>
<x>252</x>
<y>29</y>
</hint>
<hint type="destinationlabel">
<x>577</x>
<y>183</y>
<x>250</x>
<y>39</y>
</hint>
</hints>
</connection>
@ -988,12 +1000,12 @@
<slot>setCurrentIndex(int)</slot>
<hints>
<hint type="sourcelabel">
<x>379</x>
<y>30</y>
<x>250</x>
<y>39</y>
</hint>
<hint type="destinationlabel">
<x>294</x>
<y>427</y>
<x>250</x>
<y>39</y>
</hint>
</hints>
</connection>

View File

@ -24,7 +24,7 @@ void OBSPropertiesView::RefreshProperties()
QSizePolicy mainPolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Preferred);
widget->setSizePolicy(policy);
//widget->setSizePolicy(policy);
layout->setSizeConstraint(QLayout::SetMaximumSize);
layout->setLabelAlignment(Qt::AlignRight);
@ -35,6 +35,7 @@ void OBSPropertiesView::RefreshProperties()
obs_property_next(&property);
}
setWidgetResizable(true);
setWidget(widget);
setSizePolicy(mainPolicy);

View File

@ -48,7 +48,8 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
source, (PropertiesUpdateCallback)obs_source_update);
layout()->addWidget(view);
layout()->setAlignment(view, Qt::AlignRight);
layout()->setAlignment(view, Qt::AlignBottom);
view->setMinimumHeight(150);
view->show();
connect(windowHandle(), &QWindow::screenChanged, [this]() {