summaryrefslogtreecommitdiffstats
path: root/examples/webview/minibrowser/LoadProgressStyle.qml
diff options
context:
space:
mode:
authorVenugopal Shivashankar <venugopal.shivashankar@digia.com>2014-12-01 17:04:16 +0100
committerVenugopal Shivashankar <venugopal.shivashankar@digia.com>2015-02-09 09:41:57 +0000
commit1a3959d75260105a43bd17bec7237b58515377d1 (patch)
treeb08b35b214051301daeac63041aef537fd85aa19 /examples/webview/minibrowser/LoadProgressStyle.qml
parent57f79fed29fbed44f8467c34565a00dfd429454f (diff)
Example: Made a few cosmetic changes
- Added a progress bar to indicate the WebView.loadProgress - Added a ToolButton to stop/reload the web page - Replaced the ToolButton text with tooltip to reduce the space used. Change-Id: I3447af9ad2469d6460b3a6acbadb8d733845980f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Diffstat (limited to 'examples/webview/minibrowser/LoadProgressStyle.qml')
-rw-r--r--examples/webview/minibrowser/LoadProgressStyle.qml57
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/webview/minibrowser/LoadProgressStyle.qml b/examples/webview/minibrowser/LoadProgressStyle.qml
new file mode 100644
index 0000000..bf307e8
--- /dev/null
+++ b/examples/webview/minibrowser/LoadProgressStyle.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtQuick.Controls.Styles 1.2
+
+ProgressBarStyle {
+ background: Rectangle {
+ radius: 2
+ color: "transparent"
+ implicitHeight: urlField.height - 2
+ implicitWidth: urlField.width
+ }
+ progress: Rectangle {
+ anchors.fill: parent
+ color: "#80c342"
+ opacity: 0.5
+ }
+
+}