diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-01-25 16:39:52 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-01-25 16:39:52 +0300 |
| commit | 965a8759f0ff7ccc6edcddd6300c0d70ff97a63b (patch) | |
| tree | 63e522baf052018b2ef8d0e7fda68b965cb7815f /wizard | |
| parent | 04302ec96d3e7e2fb4b17ab34d706f32ca7b264c (diff) | |
| download | monzero-gui-965a8759f0ff7ccc6edcddd6300c0d70ff97a63b.tar.gz monzero-gui-965a8759f0ff7ccc6edcddd6300c0d70ff97a63b.tar.xz monzero-gui-965a8759f0ff7ccc6edcddd6300c0d70ff97a63b.zip | |
WizardWelcome: ListView replaced with GridView
Diffstat (limited to 'wizard')
| -rw-r--r-- | wizard/WizardWelcome.qml | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/wizard/WizardWelcome.qml b/wizard/WizardWelcome.qml index d1bbf6ce..b0a243bc 100644 --- a/wizard/WizardWelcome.qml +++ b/wizard/WizardWelcome.qml @@ -79,8 +79,10 @@ Item { XmlRole { name: "isCurrent"; query: "@enabled/string()" } } - ListView { - id: listView + GridView { + id: gridView + cellWidth: 140 + cellHeight: 120 anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom @@ -89,20 +91,20 @@ Item { anchors.leftMargin: 16 anchors.rightMargin: 16 clip: true - model: languagesModel + delegate: Item { - width: listView.width - height: 80 + id: flagDelegate + width: gridView.cellWidth + height: gridView.cellHeight + Rectangle { id: flagRect - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left width: 60; height: 60 + anchors.centerIn: parent radius: 30 - color: listView.currentIndex === index ? "#DBDBDB" : "#FFFFFF" - + color: gridView.currentIndex === index ? "#DBDBDB" : "#FFFFFF" Image { anchors.centerIn: parent source: "file:///" + applicationDirectory + flag @@ -110,30 +112,20 @@ Item { } Text { - anchors.verticalCenter: parent.verticalCenter - anchors.left: flagRect.right - anchors.right: parent.right - anchors.leftMargin: 16 font.family: "Arial" font.pixelSize: 24 - font.bold: listView.currentIndex === index + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: flagRect.bottom + anchors.topMargin: 10 + font.bold: gridView.currentIndex === index elide: Text.ElideRight color: "#3F3F3F" text: name } - - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: 1 - color: "#DBDBDB" - } - MouseArea { id: delegateArea anchors.fill: parent - onClicked: listView.currentIndex = index + onClicked: gridView.currentIndex = index } } } |
