Changeset View
Changeset View
Standalone View
Standalone View
src/controls/private/globaltoolbar/TabBarControl.qml
Show All 29 Lines | 26 | Controls.TabBar { | |||
---|---|---|---|---|---|
30 | Repeater { | 30 | Repeater { | ||
31 | id: mainRepeater | 31 | id: mainRepeater | ||
32 | model: pageRow.depth | 32 | model: pageRow.depth | ||
33 | delegate: Controls.TabButton { | 33 | delegate: Controls.TabButton { | ||
34 | anchors { | 34 | anchors { | ||
35 | top:parent.top | 35 | top:parent.top | ||
36 | bottom:parent.bottom | 36 | bottom:parent.bottom | ||
37 | } | 37 | } | ||
38 | width: mainRepeater.count == 1 ? implicitWidth : Math.max(implicitWidth, MAth.round(root.width/mainRepeater.count)) | 38 | width: mainRepeater.count == 1 ? implicitWidth : Math.max(implicitWidth, Math.round(root.width/mainRepeater.count)) | ||
39 | height: root.height | 39 | height: root.height | ||
40 | readonly property Kirigami.Page page: pageRow.get(modelData) | 40 | readonly property Kirigami.Page page: pageRow.get(modelData) | ||
41 | text: page ? page.title : "" | 41 | text: page ? page.title : "" | ||
42 | checked: modelData == pageRow.currentIndex | 42 | checked: modelData == pageRow.currentIndex | ||
43 | onClicked: pageRow.currentIndex = modelData; | 43 | onClicked: pageRow.currentIndex = modelData; | ||
44 | } | 44 | } | ||
45 | } | 45 | } | ||
46 | } | 46 | } |