From 4ff83dd4cc9634f9217cc91ee443e1b6761315b9 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 20 Sep 2023 12:53:56 +0200 Subject: [PATCH] QmlDesigner: Show remove button on hover/selection Change-Id: Ibb58d2f60bea0bf780bd51d209a5ddd953e3cf64 Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Thomas Hartmann Reviewed-by: Brook Cronin Reviewed-by: --- .../connectionseditor/ConnectionsListView.qml | 10 +++++++--- .../imports/StudioTheme/ControlStyle.qml | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml index a8159056fc0..a9075c59b1b 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml @@ -104,9 +104,11 @@ ListView { property alias delegateMouseArea: mouseArea + property bool hovered: mouseArea.containsMouse || toolTipArea.containsMouse + width: ListView.view.width height: root.style.squareControlSize.height - color: mouseArea.containsMouse ? + color: itemDelegate.hovered ? itemDelegate.ListView.isCurrentItem ? root.style.interactionHover : root.style.background.hover : "transparent" @@ -170,10 +172,12 @@ ListView { height: root.style.squareControlSize.height color: toolTipArea.containsMouse ? - itemDelegate.ListView.isCurrentItem ? root.style.interactionHover - : root.style.background.hover + itemDelegate.ListView.isCurrentItem ? root.style.interactionGlobalHover + : root.style.background.globalHover : "transparent" + visible: itemDelegate.hovered || itemDelegate.ListView.isCurrentItem + Text { anchors.fill: parent diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml index 460ff6db3f3..60ca3148fc5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml @@ -76,6 +76,7 @@ QtObject { // Special colors property color interaction: Values.themeInteraction property color interactionHover: Values.themeInteractionHover + property color interactionGlobalHover: "#ffB0E1FC" // TODO needs to removed in the future property color thumbnailLabelBackground: Values.themeThumbnailLabelBackground