diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-24 13:37:43 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-25 09:43:35 +0000 |
commit | 6b4a6b0deb54f9a65d75d9c9f1e60b32ced1a781 (patch) | |
tree | 47e8507f89553a682fdddf0de0793ecc0441c0c1 /src/imports/controls/material | |
parent | 6beb454e2ca4ce6a25ae1637d8dd9d395a18443c (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/material')
-rw-r--r-- | src/imports/controls/material/TabBar.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml index 22a80efa..901e3328 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.0 as T import QtQuick.Controls.Material 2.0 import QtQuick.Controls.Material.impl 2.0 @@ -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 { |