]> rtime.felk.cvut.cz Git - coffee/mtbrowser.git/blobdiff - main.qml
better buttons
[coffee/mtbrowser.git] / main.qml
index 24091042f3a91cf7cabf39820636b57d6209a29b..9f5dadc79ea5d3f43eab55c7b274f8e96aabeb52 100644 (file)
--- a/main.qml
+++ b/main.qml
@@ -52,12 +52,10 @@ import QtQuick 2.0
 import QtQuick.Window 2.0
 import QtWebEngine 1.0
 import QtQuick.VirtualKeyboard 2.1
-import QtQuick.Controls 2.3
+import QtQuick.Controls 2.2
 import QtQuick.Layouts 1.3
 
 Window {
-    width: 1920
-    height: 1200
     visible: true
 
     ToolBar {
@@ -69,29 +67,24 @@ Window {
         RowLayout {
 
             ToolButton {
-                text: qsTr("<")
+                text: qsTr("")
                 onClicked: webView.goBack()
-                anchors.left: parent.left
+                enabled: webView.canGoBack
             }
 
             ToolButton {
-                text: qsTr(">")
+                text: qsTr("")
                 onClicked: webView.goForward()
-            }
-
-            TextField {
-                id: urlText
-                text: ""
+                enabled: webView.canGoForward
             }
 
             ToolButton {
-                text: qsTr("Reload")
+                text: qsTr("")
                 onClicked: webView.reload()
             }
 
-            ToolButton {
-                text: qsTr("Enter")
-                onClicked: webView.url = urlText.text
+            Label {
+                id: urlText
             }
         }
     }
@@ -113,4 +106,3 @@ Window {
         anchors.right: parent.right
     }
 }
-