Commit f0366dba authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix running badges appearing behind items in widget explorer

This had two issues, "list" is a GridView and it is only attached to the actual
delegate. Also use the attached properties elsewhere.
parent 8868bb83
......@@ -63,8 +63,8 @@ Item {
widgetExplorer.addApplet(pluginName)
}
}
onEntered: list.currentIndex = index
onExited: list.currentIndex = -1
onEntered: delegate.GridView.view.currentIndex = index
onExited: delegate.GridView.view.currentIndex = index - 1
}
ColumnLayout {
......@@ -119,7 +119,7 @@ Item {
width: runningBadge.width + Math.round(units.smallSpacing * 1.5)
height: width
radius: height
visible: running && ListView.isCurrentItem
visible: running && delegate.GridView.isCurrentItem
}
}
......@@ -129,7 +129,7 @@ Item {
height: Math.round(theme.mSize(countLabel.font).height * 1.3)
radius: height
color: theme.highlightColor
visible: running && list.currentIndex == index
visible: running && delegate.GridView.isCurrentItem
onVisibleChanged: maskShaderSource.scheduleUpdate()
PlasmaComponents.Label {
......@@ -179,11 +179,12 @@ Item {
tooltip: delegate.pendingUninstall ? i18nd("plasma_shell_org.kde.plasma.desktop", "Undo uninstall")
: i18nd("plasma_shell_org.kde.plasma.desktop", "Uninstall widget")
flat: false
visible: model.local && list.currentIndex == index
visible: model.local && delegate.GridView.isCurrentItem
onHoveredChanged: {
if (hovered) {
// hovering the uninstall button triggers onExited of the main mousearea
list.currentIndex = index
delegate.GridView.view.currentIndex = index
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment