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.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-31 21:00:58 -03:00
parent ef999dfc99
commit b26c0dd7d5
2 changed files with 0 additions and 5 deletions

View File

@ -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 {

View File

@ -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"));