diff --git a/tabbox/qml/IconTabBox.qml b/tabbox/qml/IconTabBox.qml index dd01568963..88cbc49ec0 100644 --- a/tabbox/qml/IconTabBox.qml +++ b/tabbox/qml/IconTabBox.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); - } - } } } diff --git a/tabbox/qml/compact.qml b/tabbox/qml/compact.qml index 2682d14b35..050982b58b 100644 --- a/tabbox/qml/compact.qml +++ b/tabbox/qml/compact.qml @@ -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); - } - } } } diff --git a/tabbox/qml/informative.qml b/tabbox/qml/informative.qml index 96609bf890..54bcdddbdb 100644 --- a/tabbox/qml/informative.qml +++ b/tabbox/qml/informative.qml @@ -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); - } - } } } diff --git a/tabbox/qml/text.qml b/tabbox/qml/text.qml index a0c54a6786..388ffbae18 100644 --- a/tabbox/qml/text.qml +++ b/tabbox/qml/text.qml @@ -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); - } - } } } diff --git a/tabbox/qml/thumbnails.qml b/tabbox/qml/thumbnails.qml index b02f22e906..4bdddcb876 100644 --- a/tabbox/qml/thumbnails.qml +++ b/tabbox/qml/thumbnails.qml @@ -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