From 01bb84b8087b4d0df65a8ca64a6e06162844cd8e Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Tue, 16 Aug 2022 21:19:41 +0300 Subject: [PATCH] QmlDesigner: Fix faulty color during IconButton hover animation Also removed hover animation from IconButton based on UX. Fixes: QDS-7432 Change-Id: Ic9b218a288cf30079844b93bbcaec30a9024ca79 Reviewed-by: Brook Cronin Reviewed-by: Reviewed-by: Thomas Hartmann --- .../materialEditorQmlSources/MaterialEditorToolBar.qml | 8 ++++---- .../materialEditorQmlSources/MaterialEditorTopSection.qml | 2 -- .../imports/HelperWidgets/IconButton.qml | 7 ------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml index 80a8d9abbe9..ba980340fe8 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorToolBar.qml @@ -47,7 +47,7 @@ Rectangle { IconButton { icon: StudioTheme.Constants.applyMaterialToSelected - normalColor: "transparent" + normalColor: StudioTheme.Values.themeSectionHeadBackground iconSize: StudioTheme.Values.bigIconFontSize buttonSize: root.height enabled: hasMaterial && hasModelSelection && hasQuick3DImport @@ -58,7 +58,7 @@ Rectangle { IconButton { icon: StudioTheme.Constants.newMaterial - normalColor: "transparent" + normalColor: StudioTheme.Values.themeSectionHeadBackground iconSize: StudioTheme.Values.bigIconFontSize buttonSize: root.height enabled: hasQuick3DImport @@ -69,7 +69,7 @@ Rectangle { IconButton { icon: StudioTheme.Constants.deleteMaterial - normalColor: "transparent" + normalColor: StudioTheme.Values.themeSectionHeadBackground iconSize: StudioTheme.Values.bigIconFontSize buttonSize: root.height enabled: hasMaterial && hasQuick3DImport @@ -80,7 +80,7 @@ Rectangle { IconButton { icon: StudioTheme.Constants.openMaterialBrowser - normalColor: "transparent" + normalColor: StudioTheme.Values.themeSectionHeadBackground iconSize: StudioTheme.Values.bigIconFontSize buttonSize: root.height enabled: hasMaterial && hasQuick3DImport diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml index 0a5bcfab0d9..3044171ad8e 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml @@ -176,7 +176,6 @@ Column { anchors.horizontalCenter: parent.horizontalCenter IconButton { icon: StudioTheme.Constants.materialPreviewEnvironment - normalColor: "transparent" iconSize: StudioTheme.Values.bigIconFontSize buttonSize: previewOptions.width tooltip: qsTr("Select preview environment.") @@ -184,7 +183,6 @@ Column { } IconButton { icon: StudioTheme.Constants.materialPreviewModel - normalColor: "transparent" iconSize: StudioTheme.Values.bigIconFontSize buttonSize: previewOptions.width tooltip: qsTr("Select preview model.") diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml index dcd4733134a..9593213e347 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconButton.qml @@ -51,13 +51,6 @@ Rectangle { : mouseArea.containsMouse ? hoverColor : normalColor - Behavior on color { - ColorAnimation { - duration: 300 - easing.type: Easing.OutQuad - } - } - Text { id: icon