diff options
-rw-r--r-- | components/package/contents/ui/Settings.qml | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index ecea592c..a20078dc 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml | |||
@@ -82,26 +82,34 @@ Rectangle { | |||
82 | 82 | ||
83 | currentIndex: -1 | 83 | currentIndex: -1 |
84 | 84 | ||
85 | delegate: Kirigami.AbstractListItem { | 85 | onCountChanged: { |
86 | listView.currentIndex = count - 1 | ||
87 | } | ||
86 | 88 | ||
89 | delegate: Kirigami.AbstractListItem { | ||
87 | enabled: true | 90 | enabled: true |
88 | supportsMouseEvents: true | 91 | supportsMouseEvents: true |
89 | checked: listView.currentIndex == index | 92 | checked: listView.currentIndex == index |
90 | 93 | ||
94 | onCheckedChanged: { | ||
95 | if (checked) { | ||
96 | console.warn("Current index changed ", accountFactory.accountId); | ||
97 | accountDetails.source = accountFactory.uiPath | ||
98 | accountDetails.item.accountId = accountFactory.accountId | ||
99 | accountDetails.item.icon = accountFactory.icon | ||
100 | accountDetails.item.accountName = accountFactory.name | ||
101 | } | ||
102 | } | ||
103 | |||
91 | onClicked: { | 104 | onClicked: { |
92 | console.warn("Loading module is ", accountFactory.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 | 105 | listView.currentIndex = model.index |
98 | } | 106 | } |
99 | 107 | ||
100 | contentItem: RowLayout { | 108 | contentItem: RowLayout { |
101 | 109 | ||
102 | KubeFramework.AccountFactory { | 110 | KubeFramework.AccountFactory { |
103 | id: accountFactory | 111 | id: accountFactory |
104 | accountId: model.accountId | 112 | accountId: model.accountId |
105 | } | 113 | } |
106 | 114 | ||
107 | Kirigami.Icon { | 115 | Kirigami.Icon { |