From 4e97b1bb30fa79215f7162f36066336732b59f28 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 28 Aug 2018 20:38:31 -0700 Subject: [PATCH] UI: Fix macOS bug (scrollbar blocking lock icons) Normally on macOS, scrollbars are supposed to appear/disappear as you scroll, but they would be on top of the content you're scrolling. However, Qt has a bug where if you apply a custom theme to scroll bars, they no longer disappear. This causes things under the scrollbar (such as the lock icons in the sources list) to disappear under the scrollbar, because macOS normally expects those scrollbars to face out. This fixes that issue by adding a space to the end of the sources list box items to allow space for the scrollbar. --- UI/source-tree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/source-tree.cpp b/UI/source-tree.cpp index b522beddf..16529880e 100644 --- a/UI/source-tree.cpp +++ b/UI/source-tree.cpp @@ -82,6 +82,10 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) boxLayout->addWidget(label); boxLayout->addWidget(vis); boxLayout->addWidget(lock); +#ifdef __APPLE__ + /* Hack: Fixes a bug where scrollbars would be above the lock icon */ + boxLayout->addSpacing(16); +#endif Update(false);