Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | 146 | highlight: PlasmaCore.FrameSvgItem { | |||
---|---|---|---|---|---|
148 | imagePath: "widgets/viewitem" | 148 | imagePath: "widgets/viewitem" | ||
149 | prefix: "hover" | 149 | prefix: "hover" | ||
150 | width: listView.width | 150 | width: listView.width | ||
151 | } | 151 | } | ||
152 | highlightMoveDuration: 250 | 152 | highlightMoveDuration: 250 | ||
153 | boundsBehavior: Flickable.StopAtBounds | 153 | boundsBehavior: Flickable.StopAtBounds | ||
154 | Connections { | 154 | Connections { | ||
155 | target: tabBox | 155 | target: tabBox | ||
156 | onCurrentIndexChanged: {listView.currentIndex = tabBox.currentIndex;} | 156 | function onCurrentIndexChanged() {listView.currentIndex = tabBox.currentIndex;} | ||
157 | } | 157 | } | ||
158 | } | 158 | } | ||
159 | Component { | 159 | Component { | ||
160 | id: clientIconDelegate | 160 | id: clientIconDelegate | ||
161 | QIconItem { | 161 | QIconItem { | ||
162 | icon: model.icon | 162 | icon: model.icon | ||
163 | width: 16 | 163 | width: 16 | ||
164 | height: 16 | 164 | height: 16 | ||
165 | } | 165 | } | ||
166 | } | 166 | } | ||
167 | Item { | 167 | Item { | ||
168 | id: clientArea | 168 | id: clientArea | ||
169 | VisualDataModel { | 169 | VisualDataModel { | ||
170 | property alias desktopIndex: listView.currentIndex | 170 | property alias desktopIndex: listView.currentIndex | ||
171 | id: desktopClientModel | 171 | id: desktopClientModel | ||
172 | model: tabBox.model | 172 | model: tabBox.model | ||
173 | delegate: clientIconDelegate | 173 | delegate: clientIconDelegate | ||
174 | onDesktopIndexChanged: { | 174 | function onDesktopIndexChanged() { | ||
175 | desktopClientModel.rootIndex = desktopClientModel.parentModelIndex(); | 175 | desktopClientModel.rootIndex = desktopClientModel.parentModelIndex(); | ||
176 | desktopClientModel.rootIndex = desktopClientModel.modelIndex(desktopClientModel.desktopIndex); | 176 | desktopClientModel.rootIndex = desktopClientModel.modelIndex(desktopClientModel.desktopIndex); | ||
177 | } | 177 | } | ||
178 | } | 178 | } | ||
179 | ListView { | 179 | ListView { | ||
180 | id: iconsListView | 180 | id: iconsListView | ||
181 | model: desktopClientModel | 181 | model: desktopClientModel | ||
182 | clip: true | 182 | clip: true | ||
Show All 18 Lines |