mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
frontend: Clip source names when dock too small
This commit is contained in:
@@ -58,6 +58,7 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) : tre
|
||||
QPixmap pixmap = icon.pixmap(QSize(16, 16));
|
||||
|
||||
iconLabel = new QLabel();
|
||||
iconLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
|
||||
iconLabel->setPixmap(pixmap);
|
||||
iconLabel->setEnabled(sourceVisible);
|
||||
iconLabel->setStyleSheet("background: none");
|
||||
@@ -77,8 +78,7 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) : tre
|
||||
lock->setAccessibleDescription(QTStr("Basic.Main.Sources.LockDescription").arg(name));
|
||||
|
||||
label = new OBSSourceLabel(source);
|
||||
label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
|
||||
label->setAttribute(Qt::WA_TranslucentBackground);
|
||||
label->setEnabled(sourceVisible);
|
||||
|
||||
|
||||
@@ -543,6 +543,11 @@ SourceTreeItem {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
SourceTreeItem .checkbox-icon {
|
||||
margin-right: 0;
|
||||
margin-left: var(--spacing_large);
|
||||
}
|
||||
|
||||
QMenu::item:selected,
|
||||
QListView::item:selected,
|
||||
QListWidget::item:selected {
|
||||
|
||||
Reference in New Issue
Block a user