Browse Source

UI: Remove fixed icon sizes from SourceTree

Setting fixed sizes breaks rendering of the icons in subtle
ways, such as cutting 1px from their sizes. Removing these
fixes sizes seem to allow Qt to correctly render these icons,
and allows us to remove some negative margins hacks that were
added to deal with it.
Georges Basile Stavracas Neto 3 years ago
parent
commit
b26c0dd7d5
2 changed files with 0 additions and 5 deletions
  1. 0 2
      UI/data/themes/Yami.qss
  2. 0 3
      UI/source-tree.cpp

+ 0 - 2
UI/data/themes/Yami.qss

@@ -1094,7 +1094,6 @@ QGroupBox::indicator:unchecked:disabled {
 LockedCheckBox {
     outline: none;
     background: transparent;
-    margin-left: -2px;
 }
 
 LockedCheckBox::indicator {
@@ -1117,7 +1116,6 @@ LockedCheckBox::indicator:unchecked:hover {
 VisibilityCheckBox {
     outline: none;
     background: transparent;
-    margin-left: -1px;
 }
 
 VisibilityCheckBox::indicator {

+ 0 - 3
UI/source-tree.cpp

@@ -76,14 +76,12 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_)
 
 		iconLabel = new QLabel();
 		iconLabel->setPixmap(pixmap);
-		iconLabel->setFixedSize(16, 16);
 		iconLabel->setEnabled(sourceVisible);
 		iconLabel->setStyleSheet("background: none");
 	}
 
 	vis = new VisibilityCheckBox();
 	vis->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-	vis->setFixedSize(16, 16);
 	vis->setChecked(sourceVisible);
 	vis->setStyleSheet("background: none");
 	vis->setAccessibleName(QTStr("Basic.Main.Sources.Visibility"));
@@ -92,7 +90,6 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_)
 
 	lock = new LockedCheckBox();
 	lock->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-	lock->setFixedSize(16, 16);
 	lock->setChecked(obs_sceneitem_locked(sceneitem));
 	lock->setStyleSheet("background: none");
 	lock->setAccessibleName(QTStr("Basic.Main.Sources.Lock"));