From ff9e250a7a8865ae3d7664e5ef41fd79d9f5606e Mon Sep 17 00:00:00 2001 From: Pierre Rossi <pierre.rossi@digia.com> Date: Fri, 11 Oct 2013 19:06:40 +0200 Subject: [PATCH] Pimp up our QtQuick browser Change-Id: I48c0ed54cd946f223dc050b8a1f26282b02964a2 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> --- .../quick/quicknanobrowser/quickwindow.qml | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/examples/quick/quicknanobrowser/quickwindow.qml b/examples/quick/quicknanobrowser/quickwindow.qml index 3257a9852..3d3dd9470 100644 --- a/examples/quick/quicknanobrowser/quickwindow.qml +++ b/examples/quick/quicknanobrowser/quickwindow.qml @@ -41,6 +41,7 @@ import QtQuick 2.0 import QtWebEngine 1.0 import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 import QtQuick.Layouts 1.0 ApplicationWindow { @@ -62,9 +63,8 @@ ApplicationWindow { toolBar: ToolBar { id: navigationBar - ColumnLayout { - anchors.fill: parent RowLayout { + anchors.fill: parent; ToolButton { id: backButton iconSource: "icons/go-previous.png" @@ -82,27 +82,43 @@ ApplicationWindow { iconSource: webEngineView.loading ? "icons/process-stop.png" : "icons/view-refresh.png" onClicked: webEngineView.reload() } - Image { - id: faviconImage - width: 16; height: 16 - } TextField { id: addressBar + Image { + anchors.verticalCenter: addressBar.verticalCenter; + x: 5 + z: 2 + id: faviconImage + width: 16; height: 16 + } + style: TextFieldStyle { + padding { + left: 26; + } + } focus: true Layout.fillWidth: true - onAccepted: webEngineView.url = utils.fromUserInput(text) } } ProgressBar { - Layout.fillWidth: true id: progressBar + height: 3 + anchors { + left: parent.left + top: parent.bottom + right: parent.right + leftMargin: -parent.leftMargin + rightMargin: -parent.rightMargin + } + style: ProgressBarStyle { + background: Item {} + } + z: -2; minimumValue: 0 maximumValue: 100 } - } } - WebEngineView { id: webEngineView focus: true -- GitLab