From 68a41da9b16091a577a94cec7eccd4c892905391 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 11 Mar 2016 20:57:54 +0100 Subject: Extended maildir settings to create and register the sink resource --- components/package/contents/ui/Settings.qml | 84 ++++++++++++++--------------- 1 file changed, 40 insertions(+), 44 deletions(-) (limited to 'components/package/contents/ui/Settings.qml') 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 { SplitView { anchors.fill: parent - ScrollView { - id: accountsList + ColumnLayout { + ScrollView { + id: accountsList width: Unit.size * 55 Layout.maximumWidth: Unit.size * 150 Layout.minimumWidth: Unit.size * 30 - ListView { - id: listView + ListView { + id: listView - model: accountsController.accounts + model: accountsController.accounts - currentIndex: -1 + currentIndex: -1 - delegate: PlasmaComponents.ListItem { + delegate: PlasmaComponents.ListItem { - width: listView.width - height: Unit.size * 10 + width: listView.width + height: Unit.size * 10 - enabled: true - checked: listView.currentIndex == index + enabled: true + checked: listView.currentIndex == index - KubeFramework.AccountFactory { - id: accountFactory - accountId: modelData - } - - MouseArea { - anchors { - fill: parent + KubeFramework.AccountFactory { + id: accountFactory + accountId: modelData } - onClicked: { - accountDetails.source = accountFactory.uiPath + MouseArea { + anchors { + fill: parent + } - listView.currentIndex = model.index + onClicked: { + console.warn("Loading module is ", accountFactory.acountId); + accountDetails.source = accountFactory.uiPath + listView.currentIndex = model.index + } } - } - RowLayout { - anchors.fill: parent + RowLayout { + anchors.fill: parent - PlasmaCore.IconItem { - source: accountFactory.icon - } + PlasmaCore.IconItem { + source: accountFactory.icon + } - Label { - text: accountFactory.name + Label { + text: accountFactory.name + } } } } + + } + Button { + id: button + text: "Create New" + onClicked: { + accountsController.createAccount("maildir"); + } } } @@ -128,19 +138,5 @@ Rectangle { Layout.fillWidth: true } } - - /* - Button { - id: button - text: "Create New" - onClicked: { - accountsController.createAccount("maildir"); - } - } - - //TODO: Add possibility to add more accounts - - */ } - } -- cgit v1.2.3