QmlDesigner: Hide CollectionDetails when no collection is selected

Task-number: QDS-10621
Change-Id: Ifc5f16f4cffa1e0884394b94456da51505a18b2e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Ali Kianian
2023-10-18 11:25:10 +03:00
parent 544bf815f4
commit 709bcd640d

View File

@@ -13,11 +13,16 @@ Rectangle {
required property var model
implicitWidth: 600
implicitHeight: 400
color: StudioTheme.Values.themeBackgroundColorAlternate
ColumnLayout {
id: topRow
visible: collectionNameText.text !== ""
spacing: 0
anchors {
fill: parent
@@ -231,6 +236,17 @@ Rectangle {
}
}
Text {
anchors.fill: parent
text: qsTr("Select a collection to continue")
visible: !topRow.visible
textFormat: Text.RichText
color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.mediumFontSize
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
TextMetrics {
id: headerTextMetrics