From fbbf274c511b0a36815aac70d901ffcb0753dbb4 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 24 Apr 2014 21:12:23 -0700 Subject: [PATCH] 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? --- obs/forms/OBSBasicProperties.ui | 8 ++++---- obs/forms/OBSBasicSettings.ui | 30 +++++++++++++++++++++--------- obs/properties-view.cpp | 3 ++- obs/window-basic-properties.cpp | 3 ++- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/obs/forms/OBSBasicProperties.ui b/obs/forms/OBSBasicProperties.ui index d438461a7..6102903f7 100644 --- a/obs/forms/OBSBasicProperties.ui +++ b/obs/forms/OBSBasicProperties.ui @@ -6,8 +6,8 @@ 0 0 - 1072 - 441 + 664 + 562 @@ -16,11 +16,11 @@ true - + - + 0 0 diff --git a/obs/forms/OBSBasicSettings.ui b/obs/forms/OBSBasicSettings.ui index 3afeaa290..41f57e3de 100644 --- a/obs/forms/OBSBasicSettings.ui +++ b/obs/forms/OBSBasicSettings.ui @@ -86,7 +86,7 @@ - 1 + 2 @@ -242,6 +242,12 @@ + + + 0 + 0 + + @@ -264,6 +270,12 @@ false + + + 0 + 0 + + 0 @@ -972,12 +984,12 @@ setCurrentIndex(int) - 329 - 168 + 252 + 29 - 577 - 183 + 250 + 39 @@ -988,12 +1000,12 @@ setCurrentIndex(int) - 379 - 30 + 250 + 39 - 294 - 427 + 250 + 39 diff --git a/obs/properties-view.cpp b/obs/properties-view.cpp index 7ea6d73c2..27aa20432 100644 --- a/obs/properties-view.cpp +++ b/obs/properties-view.cpp @@ -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); diff --git a/obs/window-basic-properties.cpp b/obs/window-basic-properties.cpp index e8430939a..4310b07c9 100644 --- a/obs/window-basic-properties.cpp +++ b/obs/window-basic-properties.cpp @@ -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]() {