Quellcode durchsuchen

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.
jp9000 vor 7 Jahren
Ursprung
Commit
4e97b1bb30
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      UI/source-tree.cpp

+ 4 - 0
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);