aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2023-09-20 12:53:56 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2023-09-21 08:35:51 +0000
commit5ccd14824c83b1f1219c4fa1dbb1ef55573d162f (patch)
treec9be0104a7f7bfb300012f7d3f24c445475c646b
parentdff5f9184a9f551f0745ceddbe064680a1400f47 (diff)
QmlDesigner: Show remove button on hover/selection
Change-Id: Ibb58d2f60bea0bf780bd51d209a5ddd953e3cf64 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Brook Cronin <brook.cronin@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> (cherry picked from commit fec3751372291c9f2fddc3636a977e11994578a5)
-rw-r--r--share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml10
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml1
2 files changed, 8 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml
index d138c19031..1827b4f8f4 100644
--- a/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml
+++ b/share/qtcreator/qmldesigner/connectionseditor/ConnectionsListView.qml
@@ -105,9 +105,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"
@@ -171,10 +173,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 0496a426ed..b0e6e3e798 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/ControlStyle.qml
@@ -77,6 +77,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