@@ -29,54 +29,54 @@ T.TabBar {
2929 contentHeight + topPadding + bottomPadding)
3030
3131 contentItem: ListView {
32- model: control .contentModel
33- currentIndex: control .currentIndex
32+ model: control .contentModel
33+ currentIndex: control .currentIndex
3434
35- spacing: control .spacing
36- orientation: ListView .Horizontal
37- boundsBehavior: Flickable .StopAtBounds
38- flickableDirection: Flickable .AutoFlickIfNeeded
39- snapMode: ListView .SnapToItem
35+ spacing: control .spacing
36+ orientation: ListView .Horizontal
37+ boundsBehavior: Flickable .StopAtBounds
38+ flickableDirection: Flickable .AutoFlickIfNeeded
39+ snapMode: ListView .SnapToItem
4040
41- ScrollBar .horizontal : ScrollBar {
42- policy: ScrollBar .AlwaysOn
43- }
44-
45- highlightMoveDuration: 100
46- highlightRangeMode: ListView .ApplyRange
47- preferredHighlightBegin: 48
48- preferredHighlightEnd: width - 48
41+ ScrollBar .horizontal : ScrollBar {
42+ policy: ScrollBar .AlwaysOn
43+ }
4944
45+ highlightMoveDuration: 100
46+ highlightRangeMode: ListView .ApplyRange
47+ preferredHighlightBegin: 48
48+ preferredHighlightEnd: width - 48
5049
51- MouseArea {
52- anchors .fill : parent
5350
54- // Scroll the view without the need for a modifier
55- onWheel : function (evt ) {
56- if (parent .contentWidth < parent .width ) {
57- return
58- }
51+ MouseArea {
52+ anchors .fill : parent
5953
60- if (evt .angleDelta .y > 0 ) {
61- parent .contentX = Math .max (0 , parent .contentX - 10 )
62- } else {
63- parent .contentX = Math .min (
64- parent .contentWidth - parent .width ,
65- parent .contentX + 10
66- )
67- }
54+ // Scroll the view without the need for a modifier.
55+ onWheel : function (evt ) {
56+ if (parent .contentWidth < parent .width ) {
57+ return
6858 }
6959
70- // Ignore all other events and thus pass then to the
71- // underlying ListView
72- onClicked : ( mouse ) => mouse . accepted = false
73- onPressed : ( mouse ) => mouse . accepted = false
74- onReleased : ( mouse ) => mouse . accepted = false
75- onDoubleClicked : ( mouse ) => mouse . accepted = false
76- onPositionChanged : ( mouse ) => mouse . accepted = false
77- onPressAndHold : ( mouse ) => mouse . accepted = false
60+ if ( evt . angleDelta . y > 0 ) {
61+ parent . contentX = Math . max ( 0 , parent . contentX - 10 )
62+ } else {
63+ parent . contentX = Math . min (
64+ parent . contentWidth - parent . width ,
65+ parent . contentX + 10
66+ )
67+ }
7868 }
69+
70+ // Ignore all other events and thus pass then to the
71+ // underlying ListView.
72+ onClicked : (mouse ) => mouse .accepted = false
73+ onPressed : (mouse ) => mouse .accepted = false
74+ onReleased : (mouse ) => mouse .accepted = false
75+ onDoubleClicked : (mouse ) => mouse .accepted = false
76+ onPositionChanged : (mouse ) => mouse .accepted = false
77+ onPressAndHold : (mouse ) => mouse .accepted = false
7978 }
79+ }
8080
8181 background: Rectangle {
8282 implicitWidth: 200
0 commit comments