From 27c8a0673d1ba311d1b6a61ac8158f9cad2f7bb2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 29 Nov 2024 17:10:15 +0200 Subject: [PATCH] EffectComposer: Show scrollbar on show more error view Fixes: QDS-14238 Change-Id: I5f352b224ead4745100180c724b5e6270a68cea7 Reviewed-by: Mahmoud Badri --- .../effectComposerQmlSources/PreviewError.qml | 29 ++++++++----------- .../imports/HelperWidgets/ScrollView.qml | 3 +- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/share/qtcreator/qmldesigner/effectComposerQmlSources/PreviewError.qml b/share/qtcreator/qmldesigner/effectComposerQmlSources/PreviewError.qml index 29ce584c9d6..1df03250704 100644 --- a/share/qtcreator/qmldesigner/effectComposerQmlSources/PreviewError.qml +++ b/share/qtcreator/qmldesigner/effectComposerQmlSources/PreviewError.qml @@ -37,25 +37,20 @@ Rectangle { } } - MouseArea { - id: errorMouseArea + HelperWidgets.Button { + id: showLessButton - hoverEnabled: true - acceptedButtons: Qt.NoButton - anchors.fill: parent + width: 100 + height: 30 + text: qsTr("Show Less") + visible: root.showErrorDetails + opacity: scrollView.hovered || showLessButton.hovered ? 1 : 0.3 + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.rightMargin: 8 + StudioTheme.Values.scrollBarThicknessHover - HelperWidgets.Button { - width: 100 - height: 30 - text: qsTr("Show Less") - visible: root.showErrorDetails - opacity: errorMouseArea.containsMouse ? 1 : 0.3 - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: 4 - - onClicked: root.showErrorDetails = false - } + onClicked: root.showErrorDetails = false } Column { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml index 707f3e5669d..828aa7f1657 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml @@ -15,7 +15,6 @@ Flickable { readonly property bool horizontalScrollBarVisible: horizontalScrollBar.scrollBarVisible readonly property bool bothVisible: flickable.verticalScrollBarVisible && flickable.horizontalScrollBarVisible - property bool hideVerticalScrollBar: false property bool hideHorizontalScrollBar: false @@ -24,6 +23,8 @@ Flickable { default property alias content: areaItem.children property bool adsFocus: false + property alias hovered: hoverHandler.hovered + // objectName is used by the dock widget to find this particular ScrollView // and set the ads focus on it. objectName: "__mainSrollView"