Browse Source

UI: Fix cramped source tree sub-widgets on macOS

jp9000 7 years ago
parent
commit
b760b24ff0
1 changed files with 8 additions and 0 deletions
  1. 8 0
      UI/source-tree.cpp

+ 8 - 0
UI/source-tree.cpp

@@ -54,6 +54,11 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_)
 	label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
 	label->setAttribute(Qt::WA_TranslucentBackground);
 
+#ifdef __APPLE__
+	vis->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+	lock->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+#endif
+
 	boxLayout = new QHBoxLayout();
 	boxLayout->setContentsMargins(1, 1, 2, 1);
 	boxLayout->setSpacing(1);
@@ -353,6 +358,9 @@ void SourceTreeItem::Update(bool force)
 				QSizePolicy::Maximum);
 		expand->setMaximumSize(10, 16);
 		expand->setMinimumSize(10, 0);
+#ifdef __APPLE__
+		expand->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+#endif
 		boxLayout->insertWidget(0, expand);
 
 		obs_data_t *data = obs_sceneitem_get_private_settings(sceneitem);