forked from qt-creator/qt-creator
QmlDesigner: Reserve enough vertical space for info labels in 3D import
Fixes: QDS-12977 Change-Id: I10e5460029965a66e62672383cb555417e4e122c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -1198,6 +1198,8 @@ void ItemLibraryAssetImportDialog::onImportReadyForPreview(
|
|||||||
QPixmap placeHolder = QPixmap(":/navigator/icon/tooltip_placeholder.png").scaled(48, 48);
|
QPixmap placeHolder = QPixmap(":/navigator/icon/tooltip_placeholder.png").scaled(48, 48);
|
||||||
|
|
||||||
int maxNameLen = 150;
|
int maxNameLen = 150;
|
||||||
|
// Used to initially layout infolabel with sufficient height
|
||||||
|
const QString tallStr = "Wj\nWj\nWj";
|
||||||
|
|
||||||
QStringList assetNames;
|
QStringList assetNames;
|
||||||
for (const ItemLibraryAssetImporter::PreviewData &data : previewData) {
|
for (const ItemLibraryAssetImporter::PreviewData &data : previewData) {
|
||||||
@@ -1216,8 +1218,9 @@ void ItemLibraryAssetImportDialog::onImportReadyForPreview(
|
|||||||
impData.iconLabel = iconLabel;
|
impData.iconLabel = iconLabel;
|
||||||
layout->addWidget(iconLabel);
|
layout->addWidget(iconLabel);
|
||||||
auto infoLabel = new QLabel(w);
|
auto infoLabel = new QLabel(w);
|
||||||
infoLabel->setFixedWidth(maxNameLen);
|
|
||||||
impData.infoLabel = infoLabel;
|
impData.infoLabel = infoLabel;
|
||||||
|
infoLabel->setText(tallStr);
|
||||||
|
infoLabel->setFixedWidth(maxNameLen);
|
||||||
layout->addWidget(infoLabel);
|
layout->addWidget(infoLabel);
|
||||||
layout->addStretch(1);
|
layout->addStretch(1);
|
||||||
auto removeButton = new QPushButton(m_unselectedRemoveIcon, {}, w);
|
auto removeButton = new QPushButton(m_unselectedRemoveIcon, {}, w);
|
||||||
|
Reference in New Issue
Block a user