diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-18 12:50:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-18 12:50:56 +0200 |
commit | cfd151cfa8d7b570111331e1fc3521c5ac3bb15f (patch) | |
tree | 5f3e5b4f52a038c245fd6a0f153961e1318c3815 /src/imports/controls/universal/TabBar.qml | |
parent | ed9edbf2f7af25e9d747e4dce424425242a63947 (diff) | |
parent | 072b5369ee107251d6800970263f573f74864fca (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I0b6bd9acd2262ae87e1086a0450875a8f04a0423
Diffstat (limited to 'src/imports/controls/universal/TabBar.qml')
-rw-r--r-- | src/imports/controls/universal/TabBar.qml | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/imports/controls/universal/TabBar.qml b/src/imports/controls/universal/TabBar.qml index ab660c93..c7d27cbd 100644 --- a/src/imports/controls/universal/TabBar.qml +++ b/src/imports/controls/universal/TabBar.qml @@ -46,23 +46,20 @@ T.TabBar { implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) - contentItem: PathView { + contentItem: ListView { model: control.contentModel currentIndex: control.currentIndex - interactive: false - snapMode: PathView.SnapToItem - movementDirection: PathView.Positive - highlightMoveDuration: 100 + spacing: control.spacing + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded + snapMode: ListView.SnapToItem - path: Path { - startX: control.count ? control.availableWidth / control.count / 2 : 0 - startY: control.availableHeight / 2 - PathLine { - x: control.count ? control.availableWidth + (control.availableWidth / control.count / 2) : 0 - y: control.availableHeight / 2 - } - } + highlightMoveDuration: 100 + highlightRangeMode: ListView.ApplyRange + preferredHighlightBegin: 48 + preferredHighlightEnd: width - 48 } background: Rectangle { |