diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/controls/TabBar.qml | 8 | ||||
-rw-r--r-- | src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc | 2 | ||||
-rw-r--r-- | src/imports/controls/material/TabBar.qml | 7 | ||||
-rw-r--r-- | src/quickcontrols2/qquickstyleplugin.cpp | 5 |
4 files changed, 19 insertions, 3 deletions
diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml index 5fa81f38..2c3a665b 100644 --- a/src/imports/controls/TabBar.qml +++ b/src/imports/controls/TabBar.qml @@ -34,7 +34,7 @@ ** ****************************************************************************/ -import QtQuick 2.6 +import QtQuick 2.7 import QtQuick.Templates 2.1 as T T.TabBar { @@ -58,7 +58,13 @@ T.TabBar { spacing: control.spacing orientation: ListView.Horizontal boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded snapMode: ListView.SnapToItem + + highlightMoveDuration: 0 + highlightRangeMode: ListView.ApplyRange + preferredHighlightBegin: 40 + preferredHighlightEnd: width - 40 } //! [contentItem] diff --git a/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc index 51a9b613..fe78ca55 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc @@ -30,7 +30,7 @@ \title Deploying Qt Quick Controls 2 Applications Deployment of Qt Quick Controls 2 applications is very similar to - deploment of other types of Qt applications. However, there are a few + deployment of other types of Qt applications. However, there are a few factors to consider. \section1 Deploying an Application with Several Styles diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml index 2b693809..5b2c8888 100644 --- a/src/imports/controls/material/TabBar.qml +++ b/src/imports/controls/material/TabBar.qml @@ -34,7 +34,7 @@ ** ****************************************************************************/ -import QtQuick 2.6 +import QtQuick 2.7 import QtQuick.Templates 2.1 as T import QtQuick.Controls.Material 2.1 import QtQuick.Controls.Material.impl 2.1 @@ -59,11 +59,16 @@ T.TabBar { spacing: control.spacing orientation: ListView.Horizontal boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded snapMode: ListView.SnapToItem highlightMoveDuration: 250 highlightResizeDuration: 0 highlightFollowsCurrentItem: true + highlightRangeMode: ListView.ApplyRange + preferredHighlightBegin: 48 + preferredHighlightEnd: width - 48 + highlight: Item { z: 2 Rectangle { diff --git a/src/quickcontrols2/qquickstyleplugin.cpp b/src/quickcontrols2/qquickstyleplugin.cpp index 7f6e1323..3a4a0952 100644 --- a/src/quickcontrols2/qquickstyleplugin.cpp +++ b/src/quickcontrols2/qquickstyleplugin.cpp @@ -60,6 +60,11 @@ void QQuickStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri) Q_UNUSED(engine); Q_UNUSED(uri); + // make sure not to re-create the proxy theme if initializeEngine() + // is called multiple times, like in case of qml2puppet (QTBUG-54995) + if (!m_theme.isNull()) + return; + const QString style = name(); if (!style.isEmpty() && style.compare(QQuickStyle::name(), Qt::CaseInsensitive) == 0) { m_theme.reset(createTheme()); |