Commit 5dc6a9d8 authored by J-P Nurmi's avatar J-P Nurmi Committed by The Qt Project
Browse files

TabBar: keep the current tab within the visible area


This makes it possible for the style to simply increment
or decrement the current index (consider arrow buttons).

Change-Id: I048924d7f1f506ecc3005d2ebdfeb01d5ea6ca40
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent 7db1fee0
Branches
Tags
No related merge requests found
Showing with 4 additions and 0 deletions
...@@ -114,6 +114,10 @@ FocusScope { ...@@ -114,6 +114,10 @@ FocusScope {
width: Math.min(availableWidth, count ? contentWidth : availableWidth) width: Math.min(availableWidth, count ? contentWidth : availableWidth)
height: currentItem ? currentItem.height : 0 height: currentItem ? currentItem.height : 0
highlightMoveDuration: 0
currentIndex: tabView.currentIndex
onCurrentIndexChanged: tabrow.positionViewAtIndex(currentIndex, ListView.Contain)
moveDisplaced: Transition { moveDisplaced: Transition {
NumberAnimation { NumberAnimation {
property: "x" property: "x"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment