From e32473b8da5e3e426c6c2e4f09963192a8e52162 Mon Sep 17 00:00:00 2001 From: Alexandre Van de Sande Date: Fri, 6 Feb 2015 09:56:57 -0200 Subject: [PATCH] changes to top bar --- cmd/mist/assets/qml/views/browser.qml | 28 +++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml index 2c58884780..08985c558f 100644 --- a/cmd/mist/assets/qml/views/browser.qml +++ b/cmd/mist/assets/qml/views/browser.qml @@ -75,8 +75,7 @@ Rectangle { RowLayout { id: navBar height: 74 - - + z: 20 anchors { left: parent.left right: parent.right @@ -109,6 +108,7 @@ Rectangle { color: "#FFFFFF" radius: 6 + MouseArea { anchors.fill: parent z: 10 @@ -244,6 +244,7 @@ Rectangle { }*/ Rectangle { + id: navBarBackground anchors.fill: parent gradient: Gradient { GradientStop { position: 0.0; color: "#F6F1F2" } @@ -276,12 +277,31 @@ Rectangle { bottom: parent.bottom top: divider.bottom } - + z: 10 + onLoadingChanged: { if (loadRequest.status == WebEngineView.LoadSucceededStatus) { webview.runJavaScript("document.title", function(pageTitle) { - menuItem.title = pageTitle; + //menuItem.title = pageTitle; }); + + //var topBarStyle + webView.runJavaScript("$(\"meta[name='ethereum-dapp-url-bar-style']\").attr('content');", function(topBarStyle){ + if (topBarStyle=="transparent") { + + // Adjust for a transparent sidebar Dapp + navBarBackground.visible = false; + back.visible = false; + appInfoPane.anchors.leftMargin = -16; + appInfoPaneShadow.anchors.leftMargin = -16; + webview.anchors.topMargin = -74; + webview.runJavaScript("$('body').addClass('ethereum-dapp-url-bar-style-transparent')") + + }; + }); + + + webview.runJavaScript(eth.readFile("bignumber.min.js")); webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));