From 1fa98129c038ccdef894d41ce82d3028f52e803d Mon Sep 17 00:00:00 2001 From: Alexandre Van de Sande Date: Tue, 3 Feb 2015 18:08:54 -0200 Subject: [PATCH] new app button --- cmd/mist/assets/qml/main.qml | 82 +++++++++++++++++++-------- cmd/mist/assets/qml/views/browser.qml | 4 +- 2 files changed, 61 insertions(+), 25 deletions(-) diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 7ba1e5eb52..3b2c7ba731 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -11,6 +11,9 @@ import "../ext/http.js" as Http ApplicationWindow { id: root + + //flags: Qt.FramelessWindowHint + // Use this to make the window frameless. But then you'll need to do move and resize by hand property var ethx : Eth.ethx @@ -34,9 +37,11 @@ ApplicationWindow { // Takes care of loading all default plugins Component.onCompleted: { - var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true}); - addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true}); + addPlugin("./views/catalog.qml", {noAdd: true, close: false, section: "begin"}); + var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true}); + + addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true}); addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/whisper.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"}); @@ -370,9 +375,9 @@ ApplicationWindow { rotation: 90 gradient: Gradient { - GradientStop { position: 0.0; color: "#F1ECEC" } - GradientStop { position: 0.2; color: "#FAF5F5" } - GradientStop { position: 1.0; color: "#FAF5F5" } + GradientStop { position: 0.0; color: "#D5D4D5" } + GradientStop { position: 0.1; color: "#E7E5E7" } + GradientStop { position: 1.0; color: "#E7E5E7" } } } @@ -391,6 +396,12 @@ ApplicationWindow { sel.visible = on } + function setAsBigButton(on) { + newAppButton.visible = on + label.visible = !on + buttonLabel.visible = on + } + width: 192 height: 55 color: "#00000000" @@ -400,6 +411,23 @@ ApplicationWindow { leftMargin: 4 } + Rectangle { + // New App Button + id: newAppButton + visible: false + anchors { + top: parent.top + left: parent.left + leftMargin: 6 + topMargin: 9 + } + border.width: 0 + radius: 5 + height: 37 + width: 180 + color: "#F3F1F3" + } + Rectangle { id: sel visible: false @@ -481,6 +509,16 @@ ApplicationWindow { color: "#665F5F" font.pixelSize: 14 } + + Text { + id: buttonLabel + visible: false + text: "GO TO NEW APP" + font.bold: true + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: "#AAA0A0" + } Text { id: secondary @@ -523,6 +561,9 @@ ApplicationWindow { var section; switch(options.section) { + case "begin": + section = menuBegin + break; case "ethereum": section = menuDefault; break; @@ -536,13 +577,17 @@ ApplicationWindow { var comp = menuItemTemplate.createObject(section) comp.view = view - comp.title = view.title + comp.title = options.section // view.title if(view.hasOwnProperty("iconSource")) { comp.icon = view.iconSource; } comp.closable = options.close; + if (options.section === "begin") { + comp.setAsBigButton(true) + } + return comp } @@ -554,25 +599,14 @@ ApplicationWindow { anchors.right: parent.right spacing: 3 - Rectangle { - // New App Button - id: newAppButton + + + ColumnLayout { + id: menuBegin + spacing: 3 anchors { left: parent.left - leftMargin: 6 - } - border.width: 0 - radius: 5 - height: 56 - width: 180 - color: "#F6EEEE" - - Text { - text: "GO TO NEW APP" - font.bold: true - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - color: "#AAA0A0" + right: parent.right } } @@ -597,7 +631,7 @@ ApplicationWindow { Text { - text: "NET" + text: "APPS" font.bold: true anchors { left: parent.left diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml index 7d1f78f3df..6f23c4de20 100644 --- a/cmd/mist/assets/qml/views/browser.qml +++ b/cmd/mist/assets/qml/views/browser.qml @@ -74,12 +74,14 @@ Rectangle { RowLayout { id: navBar height: 74 + + anchors { left: parent.left right: parent.right leftMargin: 7 } - + Button { id: back onClicked: {