Przeglądaj źródła

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 lat temu
rodzic
commit
b26c0dd7d5
2 zmienionych plików z 0 dodań i 5 usunięć
  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 {
 LockedCheckBox {
     outline: none;
     outline: none;
     background: transparent;
     background: transparent;
-    margin-left: -2px;
 }
 }
 
 
 LockedCheckBox::indicator {
 LockedCheckBox::indicator {
@@ -1117,7 +1116,6 @@ LockedCheckBox::indicator:unchecked:hover {
 VisibilityCheckBox {
 VisibilityCheckBox {
     outline: none;
     outline: none;
     background: transparent;
     background: transparent;
-    margin-left: -1px;
 }
 }
 
 
 VisibilityCheckBox::indicator {
 VisibilityCheckBox::indicator {

+ 0 - 3
UI/source-tree.cpp

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