UI: Fix cramped source tree sub-widgets on macOS

This commit is contained in:
jp9000 2018-06-20 20:06:36 -07:00
parent 78d566916b
commit b760b24ff0

View File

@ -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);