aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2023-09-21 13:55:26 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2023-09-21 12:24:22 +0000
commit00865d944a112c824e85d35cd768b40fda5c4cc1 (patch)
treee9777130554ef41e754e426c9c1e2f8d4a931ed4
parent67fdffabf6aed1e4da1d53f49bfc3ddb41c826e0 (diff)
QmlDesigner: Fix transient scroll bar disappearing
Task-number: QDS-10689 Task-number: QDS-10690 Change-Id: Ib74e27f06ca24ff13f3000297c88306a7a9bb579 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> (cherry picked from commit 10f4a9da3fb684846698a66cbd9691671cae5ffb)
-rw-r--r--share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml9
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/AddModuleView.qml2
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml10
3 files changed, 21 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml
index 1932af0eef..306f5405b3 100644
--- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml
+++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml
@@ -13,6 +13,11 @@ import ContentLibraryBackend
Item {
id: root
+ property bool adsFocus: false
+ // objectName is used by the dock widget to find this particular ScrollView
+ // and set the ads focus on it.
+ objectName: "__mainSrollView"
+
// Called also from C++ to close context menu on focus out
function closeContextMenu()
{
@@ -96,6 +101,7 @@ Item {
ContentLibraryMaterialsView {
id: materialsView
+ adsFocus: root.adsFocus
width: root.width
searchBox: searchBox
@@ -110,6 +116,7 @@ Item {
ContentLibraryTexturesView {
id: texturesView
+ adsFocus: root.adsFocus
width: root.width
model: ContentLibraryBackend.texturesModel
sectionCategory: "ContentLib_Tex"
@@ -120,6 +127,7 @@ Item {
ContentLibraryTexturesView {
id: environmentsView
+ adsFocus: root.adsFocus
width: root.width
model: ContentLibraryBackend.environmentsModel
sectionCategory: "ContentLib_Env"
@@ -130,6 +138,7 @@ Item {
ContentLibraryEffectsView {
id: effectsView
+ adsFocus: root.adsFocus
width: root.width
searchBox: searchBox
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AddModuleView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AddModuleView.qml
index 585c6a6d14..6ed7052b8e 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AddModuleView.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AddModuleView.qml
@@ -11,6 +11,8 @@ import ItemLibraryBackend
Column {
id: root
+ property alias adsFocus: listView.adsFocus
+
spacing: 5
signal back()
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
index 05d8d6db9c..a90fbaaa15 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
@@ -46,6 +46,12 @@ itemLibraryModel [
*/
Item {
id: itemsView
+
+ property bool adsFocus: false
+ // objectName is used by the dock widget to find this particular ScrollView
+ // and set the ads focus on it.
+ objectName: "__mainSrollView"
+
property string importToRemove
property string importToAdd
property string componentSource
@@ -217,6 +223,7 @@ Item {
id: verticalView
HelperWidgets.ScrollView {
id: verticalScrollView
+ adsFocus: itemsView.adsFocus
anchors.fill: parent
clip: true
interactive: !itemContextMenu.opened && !moduleContextMenu.opened && !ItemLibraryBackend.rootView.isDragging
@@ -327,6 +334,7 @@ Item {
leftPadding: 5
HelperWidgets.ScrollView {
id: horizontalScrollView
+ adsFocus: itemsView.adsFocus
width: 270
height: parent.height
clip: true
@@ -427,6 +435,7 @@ Item {
}
HelperWidgets.ScrollView {
id: itemScrollView
+ adsFocus: itemsView.adsFocus
width: itemsView.width - 275
height: itemsView.height
interactive: !itemContextMenu.opened && !moduleContextMenu.opened && !ItemLibraryBackend.rootView.isDragging
@@ -468,6 +477,7 @@ Item {
Component {
id: addModuleView
AddModuleView {
+ adsFocus: itemsView.adsFocus
onBack: isAddModuleView = false
}
}