From 4c1e4ed9077a8fa024af6c19a6806ecf8babfdd9 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Tue, 24 May 2022 14:43:18 +0300 Subject: [PATCH] QmlDesigner: Unify empty text between material editor and browser Make the text indicating that there are no materials, same size and content between the material editor and browser. Change-Id: I6e9e46c30d89aed090b504b256b113e2601b4659 Reviewed-by: Miikka Heikkinen --- .../qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml | 3 ++- .../materialEditorQmlSources/EmptyMaterialEditorPane.qml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml index f0d8cf7e732..77eedc67de1 100644 --- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml +++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml @@ -163,9 +163,10 @@ Item { } Text { - text: qsTr("No materials yet."); + text: qsTr("No materials yet.\nClick '+' above to start.") color: StudioTheme.Values.themeTextColor font.pixelSize: StudioTheme.Values.mediumFontSize + horizontalAlignment: Text.AlignHCenter topPadding: 30 anchors.horizontalCenter: parent.horizontalCenter visible: materialBrowserModel.hasQuick3DImport && materialBrowserModel.isEmpty && searchBox.isEmpty() diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/EmptyMaterialEditorPane.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/EmptyMaterialEditorPane.qml index 2e812dcd661..80ec524e23e 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/EmptyMaterialEditorPane.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/EmptyMaterialEditorPane.qml @@ -48,10 +48,10 @@ PropertyEditorPane { height: 150 Text { - text: hasQuick3DImport ? qsTr("No materials yet.\nClick 'Add new material' above to start.") + text: hasQuick3DImport ? qsTr("No materials yet.\nClick '+' above to start.") : qsTr("Add QtQuick3D module using the Components view to enable the Material Editor.") color: StudioTheme.Values.themeTextColor - font.pixelSize: StudioTheme.Values.baseFontSize + font.pixelSize: StudioTheme.Values.mediumFontSize horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap width: root.width