forked from qt-creator/qt-creator
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:
@@ -13,11 +13,16 @@ Rectangle {
|
|||||||
|
|
||||||
required property var model
|
required property var model
|
||||||
|
|
||||||
|
implicitWidth: 600
|
||||||
|
implicitHeight: 400
|
||||||
|
|
||||||
color: StudioTheme.Values.themeBackgroundColorAlternate
|
color: StudioTheme.Values.themeBackgroundColorAlternate
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: topRow
|
id: topRow
|
||||||
|
|
||||||
|
visible: collectionNameText.text !== ""
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
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 {
|
TextMetrics {
|
||||||
id: headerTextMetrics
|
id: headerTextMetrics
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user