diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-29 05:24:42 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-29 05:24:42 +0800 |
commit | 922974c760278b6d49cb6f286b663d60f77d5248 (patch) | |
tree | 58b04982be7dfd134103e350da7cc8b0a8fbd2eb /ethereal/assets/qml/muted.qml | |
parent | c0de11955b3a15e6122e3ec9b68623515d311962 (diff) | |
download | go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar.gz go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar.bz2 go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar.lz go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar.xz go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.tar.zst go-tangerine-922974c760278b6d49cb6f286b663d60f77d5248.zip |
Added muted
Diffstat (limited to 'ethereal/assets/qml/muted.qml')
-rw-r--r-- | ethereal/assets/qml/muted.qml | 107 |
1 files changed, 58 insertions, 49 deletions
diff --git a/ethereal/assets/qml/muted.qml b/ethereal/assets/qml/muted.qml index dbeec2167..fac8267c4 100644 --- a/ethereal/assets/qml/muted.qml +++ b/ethereal/assets/qml/muted.qml @@ -7,59 +7,68 @@ import QtQuick.Window 2.1; import Ethereum 1.0 ApplicationWindow { - id: window - title: "muted" - width: 900 - height: 600 - minimumHeight: 300 + id: window + title: "muted" + width: 900 + height: 600 + minimumHeight: 300 - property alias url: webView.url - property alias debugUrl: debugView.url - property alias webView: webView + property alias url: webView.url + property alias webView: webView - Item { - id: root - anchors.fill: parent - WebView { - objectName: "webView" - id: webView - anchors { - top: root.top - right: root.right - left: root.left - bottom: sizeGrip.top - } - } + Item { + id: root + anchors.fill: parent + WebView { + objectName: "webView" + id: webView + anchors { + top: root.top + right: root.right + left: root.left + bottom: root.bottom + //bottom: sizeGrip.top + } - Rectangle { - id: sizeGrip - color: "gray" - height: 5 - anchors { - left: root.left - right: root.right - } - y: Math.round(root.height * 2 / 3) + experimental.preferences.javascriptEnabled: true + experimental.preferences.navigatorQtObjectEnabled: true + experimental.onMessageReceived: { + var data = JSON.parse(message.data) - MouseArea { - anchors.fill: parent - drag.target: sizeGrip - drag.minimumY: 0 - drag.maximumY: root.height - sizeGrip.height - drag.axis: Drag.YAxis - } - } + switch(data.call) { + case "log": + console.log.apply(this, data.args) + break; + } + } + function postData(seed, data) { + webview.experimental.postMessage(JSON.stringify({data: data, _seed: seed})) + } + function postEvent(event, data) { + webview.experimental.postMessage(JSON.stringify({data: data, _event: event})) + } + } - WebView { - id: debugView - objectName: "debugView" - anchors { - left: root.left - right: root.right - bottom: root.bottom - top: sizeGrip.bottom - } - } - } + /* + Rectangle { + id: sizeGrip + color: "gray" + height: 5 + anchors { + left: root.left + right: root.right + } + y: Math.round(root.height * 2 / 3) + + MouseArea { + anchors.fill: parent + drag.target: sizeGrip + drag.minimumY: 0 + drag.maximumY: root.height - sizeGrip.height + drag.axis: Drag.YAxis + } + } + */ + } } |