[tabbox/qml] Do not export the item's model data as a variant
The hack to get the model data from the currently selected item to the areas outside the list view apparently broke in Qt. Now we have to export the model data elements we actually use. BUG: 334478 REVIEW: 118047
This commit is contained in:
parent
25e221ae00
commit
2653160c5a
5 changed files with 13 additions and 11 deletions
|
@ -44,12 +44,12 @@ Item {
|
|||
Component {
|
||||
id: listDelegate
|
||||
Item {
|
||||
property alias data: iconItem.data
|
||||
property alias caption: iconItem.caption
|
||||
id: delegateItem
|
||||
width: iconSize + hoverItem.margins.left + hoverItem.margins.right
|
||||
height: iconSize + hoverItem.margins.top + hoverItem.margins.bottom
|
||||
QIconItem {
|
||||
property variant data: model
|
||||
property variant caption: model.caption
|
||||
id: iconItem
|
||||
icon: model.icon
|
||||
width: iconSize
|
||||
|
|
|
@ -79,7 +79,7 @@ KWin.Switcher {
|
|||
}
|
||||
id: textItem
|
||||
property int maxWidth: 0
|
||||
text: icons.currentItem ? icons.currentItem.data.caption : ""
|
||||
text: icons.currentItem ? icons.currentItem.caption : ""
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: theme.textColor
|
||||
|
|
|
@ -67,7 +67,7 @@ KWin.Switcher {
|
|||
}
|
||||
Text {
|
||||
id: textItem
|
||||
text: icons.currentItem ? icons.currentItem.data.caption : ""
|
||||
text: icons.currentItem ? icons.currentItem.caption : ""
|
||||
height: paintedHeight
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
@ -68,12 +68,14 @@ KWin.Switcher {
|
|||
}
|
||||
clip: true
|
||||
delegate: Item {
|
||||
property alias data: thumbnailItem.data
|
||||
property alias caption: thumbnailItem.caption
|
||||
property alias icon: thumbnailItem.icon
|
||||
id: delegateItem
|
||||
width: thumbnailListView.thumbnailWidth
|
||||
height: thumbnailListView.thumbnailWidth*(1.0/dialogMainItem.screenFactor)
|
||||
KWin.ThumbnailItem {
|
||||
property variant data: model
|
||||
property variant caption: model.caption
|
||||
property variant icon: model.icon
|
||||
id: thumbnailItem
|
||||
wId: windowId
|
||||
clip: true
|
||||
|
@ -118,7 +120,7 @@ KWin.Switcher {
|
|||
}
|
||||
QIconItem {
|
||||
id: iconItem
|
||||
icon: thumbnailListView.currentItem ? thumbnailListView.currentItem.data.icon : ""
|
||||
icon: thumbnailListView.currentItem ? thumbnailListView.currentItem.icon : ""
|
||||
width: 32
|
||||
height: 32
|
||||
anchors {
|
||||
|
@ -140,7 +142,7 @@ KWin.Switcher {
|
|||
}
|
||||
id: textItem
|
||||
property int maxWidth: 0
|
||||
text: thumbnailListView.currentItem ? thumbnailListView.currentItem.data.caption : ""
|
||||
text: thumbnailListView.currentItem ? thumbnailListView.currentItem.caption : ""
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: theme.textColor
|
||||
|
|
|
@ -75,12 +75,12 @@ KWin.Switcher {
|
|||
height: listView.thumbnailWidth*(1.0/screenFactor)
|
||||
}
|
||||
delegate: Item {
|
||||
property alias data: thumbnailItem.data
|
||||
property alias caption: thumbnailItem.caption
|
||||
width: listView.thumbnailWidth
|
||||
height: listView.thumbnailWidth*(1.0/screenFactor)
|
||||
KWin.DesktopThumbnailItem {
|
||||
id: thumbnailItem
|
||||
property variant data: model
|
||||
property variant caption: model.caption
|
||||
clip: true
|
||||
clipTo: listView
|
||||
desktop: model.desktop
|
||||
|
@ -129,7 +129,7 @@ KWin.Switcher {
|
|||
}
|
||||
id: textItem
|
||||
property int maxWidth: 0
|
||||
text: listView.currentItem ? listView.currentItem.data.caption : ""
|
||||
text: listView.currentItem ? listView.currentItem.caption : ""
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: theme.textColor
|
||||
|
|
Loading…
Reference in a new issue