Skip to content

Commit

Permalink
UI: Fix cramped source tree sub-widgets on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jp9000 committed Jun 21, 2018
1 parent 78d5669 commit b760b24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions UI/source-tree.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b760b24

Please sign in to comment.