diff options
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r-- | components/package/contents/ui/Settings.qml | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index f6a03945..acdc42d7 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml | |||
@@ -68,57 +68,67 @@ Rectangle { | |||
68 | SplitView { | 68 | SplitView { |
69 | anchors.fill: parent | 69 | anchors.fill: parent |
70 | 70 | ||
71 | ScrollView { | 71 | ColumnLayout { |
72 | id: accountsList | 72 | ScrollView { |
73 | id: accountsList | ||
73 | 74 | ||
74 | width: Unit.size * 55 | 75 | width: Unit.size * 55 |
75 | Layout.maximumWidth: Unit.size * 150 | 76 | Layout.maximumWidth: Unit.size * 150 |
76 | Layout.minimumWidth: Unit.size * 30 | 77 | Layout.minimumWidth: Unit.size * 30 |
77 | 78 | ||
78 | ListView { | 79 | ListView { |
79 | id: listView | 80 | id: listView |
80 | 81 | ||
81 | model: accountsController.accounts | 82 | model: accountsController.accounts |
82 | 83 | ||
83 | currentIndex: -1 | 84 | currentIndex: -1 |
84 | 85 | ||
85 | delegate: PlasmaComponents.ListItem { | 86 | delegate: PlasmaComponents.ListItem { |
86 | 87 | ||
87 | width: listView.width | 88 | width: listView.width |
88 | height: Unit.size * 10 | 89 | height: Unit.size * 10 |
89 | 90 | ||
90 | enabled: true | 91 | enabled: true |
91 | checked: listView.currentIndex == index | 92 | checked: listView.currentIndex == index |
92 | 93 | ||
93 | KubeFramework.AccountFactory { | 94 | KubeFramework.AccountFactory { |
94 | id: accountFactory | 95 | id: accountFactory |
95 | accountId: modelData | 96 | accountId: modelData |
96 | } | ||
97 | |||
98 | MouseArea { | ||
99 | anchors { | ||
100 | fill: parent | ||
101 | } | 97 | } |
102 | 98 | ||
103 | onClicked: { | 99 | MouseArea { |
104 | accountDetails.source = accountFactory.uiPath | 100 | anchors { |
101 | fill: parent | ||
102 | } | ||
105 | 103 | ||
106 | listView.currentIndex = model.index | 104 | onClicked: { |
105 | console.warn("Loading module is ", accountFactory.acountId); | ||
106 | accountDetails.source = accountFactory.uiPath | ||
107 | listView.currentIndex = model.index | ||
108 | } | ||
107 | } | 109 | } |
108 | } | ||
109 | 110 | ||
110 | RowLayout { | 111 | RowLayout { |
111 | anchors.fill: parent | 112 | anchors.fill: parent |
112 | 113 | ||
113 | PlasmaCore.IconItem { | 114 | PlasmaCore.IconItem { |
114 | source: accountFactory.icon | 115 | source: accountFactory.icon |
115 | } | 116 | } |
116 | 117 | ||
117 | Label { | 118 | Label { |
118 | text: accountFactory.name | 119 | text: accountFactory.name |
120 | } | ||
119 | } | 121 | } |
120 | } | 122 | } |
121 | } | 123 | } |
124 | |||
125 | } | ||
126 | Button { | ||
127 | id: button | ||
128 | text: "Create New" | ||
129 | onClicked: { | ||
130 | accountsController.createAccount("maildir"); | ||
131 | } | ||
122 | } | 132 | } |
123 | } | 133 | } |
124 | 134 | ||
@@ -128,19 +138,5 @@ Rectangle { | |||
128 | Layout.fillWidth: true | 138 | Layout.fillWidth: true |
129 | } | 139 | } |
130 | } | 140 | } |
131 | |||
132 | /* | ||
133 | Button { | ||
134 | id: button | ||
135 | text: "Create New" | ||
136 | onClicked: { | ||
137 | accountsController.createAccount("maildir"); | ||
138 | } | ||
139 | } | ||
140 | |||
141 | //TODO: Add possibility to add more accounts | ||
142 | |||
143 | */ | ||
144 | } | 141 | } |
145 | |||
146 | } | 142 | } |