aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/TabBar.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-08-24 13:37:43 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-25 09:43:35 +0000
commit6b4a6b0deb54f9a65d75d9c9f1e60b32ced1a781 (patch)
tree47e8507f89553a682fdddf0de0793ecc0441c0c1 /src/imports/controls/TabBar.qml
parent6beb454e2ca4ce6a25ae1637d8dd9d395a18443c (diff)
TabBar: improve the behavior of flickable tabs
When using flickable tabs, make sure the next or previous tab is a bit visible to make it clear that there are more tabs and ensure that the content is not flickable when there is less content than available size. Change-Id: I231ac8e99007103517ff49e747282af43cc6f8ea Task-number: QTBUG-55129 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/TabBar.qml')
-rw-r--r--src/imports/controls/TabBar.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml
index 6f3e040b..6a575167 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.0 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]