diff options
-rw-r--r-- | components/package/contents/ui/Settings.qml | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index 2ee6c859..ecea592c 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml | |||
@@ -20,7 +20,6 @@ import QtQuick.Controls 1.4 | |||
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import org.kde.kirigami 1.0 as Kirigami | 22 | import org.kde.kirigami 1.0 as Kirigami |
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | 23 | ||
25 | import org.kube.framework.settings 1.0 as KubeSettings | 24 | import org.kube.framework.settings 1.0 as KubeSettings |
26 | import org.kube.framework.domain 1.0 as KubeFramework | 25 | import org.kube.framework.domain 1.0 as KubeFramework |
@@ -83,36 +82,27 @@ Rectangle { | |||
83 | 82 | ||
84 | currentIndex: -1 | 83 | currentIndex: -1 |
85 | 84 | ||
86 | delegate: PlasmaComponents.ListItem { | 85 | delegate: Kirigami.AbstractListItem { |
87 | |||
88 | width: listView.width | ||
89 | height: Unit.size * 10 | ||
90 | 86 | ||
91 | enabled: true | 87 | enabled: true |
88 | supportsMouseEvents: true | ||
92 | checked: listView.currentIndex == index | 89 | checked: listView.currentIndex == index |
93 | 90 | ||
94 | KubeFramework.AccountFactory { | 91 | onClicked: { |
95 | id: accountFactory | 92 | console.warn("Loading module is ", accountFactory.accountId); |
96 | accountId: model.accountId | 93 | accountDetails.source = accountFactory.uiPath |
94 | accountDetails.item.accountId = accountFactory.accountId | ||
95 | accountDetails.item.icon = accountFactory.icon | ||
96 | accountDetails.item.accountName = accountFactory.name | ||
97 | listView.currentIndex = model.index | ||
97 | } | 98 | } |
98 | 99 | ||
99 | MouseArea { | 100 | contentItem: RowLayout { |
100 | anchors { | ||
101 | fill: parent | ||
102 | } | ||
103 | 101 | ||
104 | onClicked: { | 102 | KubeFramework.AccountFactory { |
105 | console.warn("Loading module is ", accountFactory.accountId); | 103 | id: accountFactory |
106 | accountDetails.source = accountFactory.uiPath | 104 | accountId: model.accountId |
107 | accountDetails.item.accountId = accountFactory.accountId | ||
108 | accountDetails.item.icon = accountFactory.icon | ||
109 | accountDetails.item.accountName = accountFactory.name | ||
110 | listView.currentIndex = model.index | ||
111 | } | 105 | } |
112 | } | ||
113 | |||
114 | RowLayout { | ||
115 | anchors.fill: parent | ||
116 | 106 | ||
117 | Kirigami.Icon { | 107 | Kirigami.Icon { |
118 | source: accountFactory.icon | 108 | source: accountFactory.icon |