Move mouse area into the delegate

Fixes mouse clicks not being accepted in TabBox in case the view
had started to scroll.
remotes/origin/Plasma/5.0
Martin Gräßlin 14 years ago
parent 602f44bf84
commit fdfc479012
  1. 14
      tabbox/qml/IconTabBox.qml
  2. 14
      tabbox/qml/compact.qml
  3. 14
      tabbox/qml/informative.qml
  4. 14
      tabbox/qml/text.qml
  5. 14
      tabbox/qml/thumbnails.qml

@ -75,6 +75,13 @@ Item {
bottomMargin: hoverItem.margins.bottom
}
}
MouseArea {
anchors.fill: parent
onClicked: {
iconsListView.currentIndex = index;
iconsListView.currentIndexChanged(iconsListView.currentIndex);
}
}
}
}
ListView {
@ -103,12 +110,5 @@ Item {
height: iconSize + margins.top + margins.bottom
}
highlightMoveDuration: 250
MouseArea {
anchors.fill: parent
onClicked: {
iconsListView.currentIndex = iconsListView.indexAt(mouse.x, mouse.y);
iconsListView.currentIndexChanged(iconsListView.currentIndex);
}
}
}
}

@ -124,6 +124,13 @@ Item {
leftMargin: 2 * compactTabBox.textMargin
}
}
MouseArea {
anchors.fill: parent
onClicked: {
compactListView.currentIndex = index;
compactListView.currentIndexChanged(compactListView.currentIndex);
}
}
}
}
ListView {
@ -189,12 +196,5 @@ Item {
width: compactListView.width
}
highlightMoveDuration: 250
MouseArea {
anchors.fill: parent
onClicked: {
compactListView.currentIndex = compactListView.indexAt(mouse.x, mouse.y);
compactListView.currentIndexChanged(compactListView.currentIndex);
}
}
}
}

@ -140,6 +140,13 @@ Item {
rightMargin: hoverItem.margins.right
}
}
MouseArea {
anchors.fill: parent
onClicked: {
listView.currentIndex = index;
listView.currentIndexChanged(listView.currentIndex);
}
}
}
}
ListView {
@ -205,12 +212,5 @@ Item {
width: listView.width
}
highlightMoveDuration: 250
MouseArea {
anchors.fill: parent
onClicked: {
listView.currentIndex = listView.indexAt(mouse.x, mouse.y);
listView.currentIndexChanged(listView.currentIndex);
}
}
}
}

@ -91,6 +91,13 @@ Item {
leftMargin: hoverItem.margins.left
}
}
MouseArea {
anchors.fill: parent
onClicked: {
textListView.currentIndex = index;
textListView.currentIndexChanged(textListView.currentIndex);
}
}
}
}
ListView {
@ -154,12 +161,5 @@ Item {
width: textListView.width
}
highlightMoveDuration: 250
MouseArea {
anchors.fill: parent
onClicked: {
textListView.currentIndex = textListView.indexAt(mouse.x, mouse.y);
textListView.currentIndexChanged(textListView.currentIndex);
}
}
}
}

@ -107,6 +107,13 @@ Item {
bottomMargin: hoverItem.margins.bottom
}
}
MouseArea {
anchors.fill: parent
onClicked: {
thumbnailListView.currentIndex = index;
thumbnailListView.currentIndexChanged(thumbnailListView.currentIndex);
}
}
}
highlight: PlasmaCore.FrameSvgItem {
id: highlightItem
@ -115,13 +122,6 @@ Item {
width: thumbnailListView.thumbnailWidth
height: thumbnailListView.thumbnailWidth*(1.0/screenFactor)
}
MouseArea {
anchors.fill: parent
onClicked: {
thumbnailListView.currentIndex = thumbnailListView.indexAt(mouse.x, mouse.y);
thumbnailListView.currentIndexChanged(thumbnailListView.currentIndex);
}
}
}
Item {
height: 40

Loading…
Cancel
Save