Skip to content

Draft: ExpandableListItem: give it a pressed state when it's expandable

This lets it use PlasmaExtras.Highlight's standard styling for pressed states. For example:

image

Part of plasma-workspace#97.


Draft because two things aren't working properly and I haven't been able to figure out how to fix them yet; see the FIXME comments in the code. Assistance would be appreciated.

To test, apply this diff to plasma-nm and click on a network list item

diff --git applet/contents/ui/ConnectionListPage.qml applet/contents/ui/ConnectionListPage.qml
index 2b3db1b4..ac6bc5b9 100644
--- applet/contents/ui/ConnectionListPage.qml
+++ applet/contents/ui/ConnectionListPage.qml
@@ -83,7 +83,9 @@ ColumnLayout {
             section.delegate: ListItem {
                 separator: true
             }
-            highlight: PlasmaExtras.Highlight { }
+            highlight: PlasmaExtras.Highlight {
+                pressed: connectionView.currentItem && connectionView.currentItem.pressed
+            }
             highlightMoveDuration: 0
             highlightResizeDuration: 0
             delegate: ConnectionItem {
Edited by Nate Graham

Merge request reports