Commit b7291760 authored by Niccolò Venerandi's avatar Niccolò Venerandi Committed by Niccolò Venerandi

Use consistent highlight

Summary: Use the PlasmaComponents.Highlight feature to be consistent with other lists.

Reviewers: jgrulich, #vdg, ngraham

Reviewed By: jgrulich, #vdg, ngraham

Subscribers: davidre, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27823
parent d88b5dcb
......@@ -52,7 +52,6 @@ ListItem {
height: expanded ? baseHeight + expandableComponentLoader.height + units.smallSpacing * (ConnectionState == PlasmaNM.Enums.Active ? 1 : Uuid ? 2 : 1)
: baseHeight
highlightRect: Qt.rect(mainColumn.x, mainColumn.y, mainColumn.width, baseHeight)
ColumnLayout {
id: mainColumn
......@@ -67,11 +66,11 @@ ListItem {
onEntered: {
connectionView.currentVisibleButtonIndex = index
connectionItem.checked = true
connectionView.currentIndex = index
}
onExited: {
connectionItem.checked = false
connectionView.currentIndex = -1
}
onPressed: {
......@@ -441,12 +440,6 @@ ListItem {
}
}
onContainsMouseChanged: {
if (connectionItem.containsMouse) {
connectionView.currentVisibleButtonIndex = index
}
}
onDeactivatedChanged: {
/* Separator is part of section, which is visible only when available connections exist. Need to determine
if there is a connection in use, to show Separator. Otherwise need to hide it from the top of the list.
......
......@@ -112,6 +112,9 @@ FocusScope {
boundsBehavior: Flickable.StopAtBounds
section.property: showSeparator ? "Section" : ""
section.delegate: ListItem { separator: true }
highlight: PlasmaComponents.Highlight { }
highlightMoveDuration: 0
highlightResizeDuration: 0
delegate: ConnectionItem { }
}
}
......
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