]> rtime.felk.cvut.cz Git - coffee/mtbrowser.git/blobdiff - main.qml
hdpi reeanbled
[coffee/mtbrowser.git] / main.qml
index daaab1141a2b47d45890d6798722b61f70f6490b..59fb477aea469b3dcc294aa0afb6d5d818ddbd86 100644 (file)
--- a/main.qml
+++ b/main.qml
@@ -52,23 +52,51 @@ import QtQuick 2.0
 import QtQuick.Window 2.0
 import QtWebEngine 1.0
 import QtQuick.VirtualKeyboard 2.1
+import QtQuick.Controls 2.2
+import QtQuick.Layouts 1.3
 
 Window {
-    width: 1920
-    height: 1200
     visible: true
 
-    WebEngineView {
-        anchors.fill: parent
-        url: "http://google.cz/"
+    ToolBar {
+        id: toolBar
+        anchors.left: parent.left
+        anchors.top: parent.top
+        anchors.right: parent.right
+
+        RowLayout {
+
+            ToolButton {
+                text: qsTr("<")
+                onClicked: webView.goBack()
+                anchors.left: parent.left
+            }
+
+            ToolButton {
+                text: qsTr(">")
+                onClicked: webView.goForward()
+            }
+
+            ToolButton {
+                text: qsTr("↻")
+                onClicked: webView.reload()
+            }
+
+            Label {
+                id: urlText
+                text: ""
+            }
+        }
     }
 
-    Item {
-        id: appContainer
+    WebEngineView {
+        id: webView
+        url: "https://google.cz/"
         anchors.left: parent.left
-        anchors.top: parent.top
+        anchors.top: toolBar.bottom
         anchors.right: parent.right
         anchors.bottom: inputPanel.top
+        onUrlChanged: urlText.text = webView.url
     }
 
     InputPanel {