diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-27 11:59:57 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-08-27 11:59:57 +0000 |
commit | 67f67f2cc6de160ddea4aa76afc56e86415ed99b (patch) | |
tree | 215ffb3e3716db58360bcc1b09f36f49d5d2bf00 | |
parent | b588ad9e45477a23d1ebd024a4b0a0ae49b7c7d5 (diff) | |
parent | bbc9b308db0476d77a67e8c896883410d4660acf (diff) |
Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8v5.8.0-alpha1
-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()); |