forked from qt-creator/qt-creator
QmlDesigner: Fix transient scrollbars in editor
Task-number: QDS-10731 Change-Id: I23f4fcabc4f39143b18918b76395489b07aed510 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Ali Kianian <ali.kianian@qt.io>
This commit is contained in:
@@ -3,18 +3,17 @@
|
|||||||
|
|
||||||
#include "abstracteditordialog.h"
|
#include "abstracteditordialog.h"
|
||||||
|
|
||||||
|
#include <texteditor/textdocument.h>
|
||||||
#include <texteditor/texteditor.h>
|
#include <texteditor/texteditor.h>
|
||||||
|
|
||||||
#include <qmldesigner/qmldesignerplugin.h>
|
#include <qmldesigner/qmldesignerplugin.h>
|
||||||
#include <qmljseditor/qmljseditor.h>
|
#include <qmljseditor/qmljseditor.h>
|
||||||
#include <qmljseditor/qmljseditordocument.h>
|
#include <qmljseditor/qmljseditordocument.h>
|
||||||
#include <texteditor/textdocument.h>
|
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QPushButton>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -102,8 +101,6 @@ void AbstractEditorDialog::setupJSEditor()
|
|||||||
m_editorWidget->setLineNumbersVisible(false);
|
m_editorWidget->setLineNumbersVisible(false);
|
||||||
m_editorWidget->setMarksVisible(false);
|
m_editorWidget->setMarksVisible(false);
|
||||||
m_editorWidget->setCodeFoldingSupported(false);
|
m_editorWidget->setCodeFoldingSupported(false);
|
||||||
m_editorWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
|
||||||
m_editorWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
|
||||||
m_editorWidget->setTabChangesFocus(true);
|
m_editorWidget->setTabChangesFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
#include <utils/transientscroll.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
@@ -34,6 +35,8 @@ BindingEditorWidget::BindingEditorWidget()
|
|||||||
m_context->setContext(context);
|
m_context->setContext(context);
|
||||||
Core::ICore::addContextObject(m_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
|
* 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.
|
* use the cursor position of the original editor in the editor manager.
|
||||||
|
|||||||
Reference in New Issue
Block a user