From 93575c8dcede5a43b08bed015826201941f18dc7 Mon Sep 17 00:00:00 2001 From: Alexandre Van de Sande Date: Thu, 5 Mar 2015 18:42:20 -0300 Subject: [PATCH] Added a thin invisible top handle for moving the window around --- cmd/mist/assets/qml/main.qml | 80 ++++++++------------------- cmd/mist/assets/qml/views/catalog.qml | 2 + 2 files changed, 26 insertions(+), 56 deletions(-) diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 58ccbfd25a..db617c704d 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -321,7 +321,6 @@ ApplicationWindow { } onPositionChanged: { if (!(root.width - mouseX + lastMouseX < root.minimumWidth)) { - //root.x += (mouseX - lastMouseX) root.width -= (mouseX - lastMouseX) root.x = lastRight - root.width } @@ -518,8 +517,6 @@ ApplicationWindow { source: "fonts/Simple-Line-Icons.ttf" } - - Rectangle { id: sideMenuInteractions anchors.fill: parent @@ -536,15 +533,9 @@ ApplicationWindow { root.x += (mouseX - lastMouseX) root.y += (mouseY - lastMouseY) } - /*onDoubleClicked: { - //!maximized ? view.set_max() : view.set_normal()} - visibility = "Minimized" - }*/ } } - - Rectangle { width: parent.height height: parent.width @@ -1068,54 +1059,31 @@ ApplicationWindow { anchors.top: parent.top color: "#00000000" - /*Rectangle { - id: urlPane - height: 40 - color: "#00000000" - anchors { - left: parent.left - right: parent.right - leftMargin: 5 - rightMargin: 5 - top: parent.top - topMargin: 5 - } - TextField { - id: url - objectName: "url" - placeholderText: "DApp URL" - anchors { - left: parent.left - right: parent.right - top: parent.top - topMargin: 5 - rightMargin: 5 - leftMargin: 5 - } + Rectangle { + id: topMovingHandle + anchors { + top: parent.top + left: parent.left + right: parent.right + } + height: 37 + color: "transparent" + z: 100 - Keys.onReturnPressed: { - if(/^https?/.test(this.text)) { - newBrowserTab(this.text); - } else { - addPlugin(this.text, {close: true, section: "apps"}) - } - } - } - - } - - // Border - Rectangle { - id: divider - anchors { - left: parent.left - right: parent.right - top: urlPane.bottom - } - z: -1 - height: 1 - color: "#CCCCCC" - }*/ + MouseArea { + anchors.fill: parent + property real lastMouseX: 0 + property real lastMouseY: 0 + onPressed: { + lastMouseX = mouseX + lastMouseY = mouseY + } + onPositionChanged: { + root.x += (mouseX - lastMouseX) + root.y += (mouseY - lastMouseY) + } + } + } Rectangle { id: mainView diff --git a/cmd/mist/assets/qml/views/catalog.qml b/cmd/mist/assets/qml/views/catalog.qml index 29e1330742..f0f8d4a2a1 100644 --- a/cmd/mist/assets/qml/views/catalog.qml +++ b/cmd/mist/assets/qml/views/catalog.qml @@ -70,6 +70,8 @@ Rectangle { anchors.fill: parent state: "inspectorShown" + + WebEngineView { objectName: "webView" id: webview