From 47ce3beecf6a527d3b68e9952360abdd1f77c2a8 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Thu, 21 Sep 2023 15:51:43 +0200 Subject: [PATCH] QmlDesigner: Fix transient scrollbars in editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QDS-10731 Change-Id: I23f4fcabc4f39143b18918b76395489b07aed510 Reviewed-by: Henning Gründl Reviewed-by: Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Ali Kianian --- .../components/bindingeditor/abstracteditordialog.cpp | 9 +++------ .../components/bindingeditor/bindingeditorwidget.cpp | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/components/bindingeditor/abstracteditordialog.cpp b/src/plugins/qmldesigner/components/bindingeditor/abstracteditordialog.cpp index 35b9c501745..9718691eb3f 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/abstracteditordialog.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/abstracteditordialog.cpp @@ -3,18 +3,17 @@ #include "abstracteditordialog.h" +#include #include - #include #include #include -#include #include -#include -#include #include #include +#include +#include namespace QmlDesigner { @@ -102,8 +101,6 @@ void AbstractEditorDialog::setupJSEditor() m_editorWidget->setLineNumbersVisible(false); m_editorWidget->setMarksVisible(false); m_editorWidget->setCodeFoldingSupported(false); - m_editorWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_editorWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_editorWidget->setTabChangesFocus(true); } diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp index da52d37a7e0..109bcd0854e 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditorwidget.cpp @@ -19,6 +19,7 @@ #include #include +#include #include @@ -34,6 +35,8 @@ BindingEditorWidget::BindingEditorWidget() m_context->setContext(context); Core::ICore::addContextObject(m_context); + Utils::TransientScrollAreaSupport::support(this); + /* * We have to register our own active auto completion shortcut, because the original short cut will * use the cursor position of the original editor in the editor manager.