mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 12:39:55 +02:00
Display spinner in Web controls when they're loading an HTTP page
This commit is contained in:
parent
a5112ce52a
commit
bc4af86b57
7 changed files with 32 additions and 0 deletions
BIN
interface/resources/icons/loader-snake-64-w.gif
Normal file
BIN
interface/resources/icons/loader-snake-64-w.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
|
@ -4,6 +4,7 @@ import QtWebChannel 1.0
|
||||||
import QtWebEngine 1.2
|
import QtWebEngine 1.2
|
||||||
|
|
||||||
import "controls"
|
import "controls"
|
||||||
|
import "controls-uit" as HifiControls
|
||||||
import "styles" as HifiStyles
|
import "styles" as HifiStyles
|
||||||
import "styles-uit"
|
import "styles-uit"
|
||||||
import "windows"
|
import "windows"
|
||||||
|
@ -117,6 +118,8 @@ Item {
|
||||||
onNewViewRequested: {
|
onNewViewRequested: {
|
||||||
request.openIn(webView);
|
request.openIn(webView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HifiControls.WebSpinner { }
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
|
|
@ -36,4 +36,6 @@ WebEngineView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebSpinner { }
|
||||||
}
|
}
|
||||||
|
|
21
interface/resources/qml/controls-uit/WebSpinner.qml
Normal file
21
interface/resources/qml/controls-uit/WebSpinner.qml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
//
|
||||||
|
// WebSpinner.qml
|
||||||
|
//
|
||||||
|
// Created by David Rowe on 23 May 2017
|
||||||
|
// Copyright 2017 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
import QtQuick 2.5
|
||||||
|
|
||||||
|
AnimatedImage {
|
||||||
|
source: "../../icons/loader-snake-64-w.gif"
|
||||||
|
visible: parent.loading && /^(http.*|)$/i.test(parent.url.toString())
|
||||||
|
z: 10000
|
||||||
|
anchors {
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
|
@ -116,6 +116,8 @@ Item {
|
||||||
tabletRoot.openBrowserWindow(request, profile);
|
tabletRoot.openBrowserWindow(request, profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HiFiControls.WebSpinner { }
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiControls.Keyboard {
|
HiFiControls.Keyboard {
|
||||||
|
|
|
@ -238,6 +238,8 @@ Item {
|
||||||
onNewViewRequested: {
|
onNewViewRequested: {
|
||||||
request.openIn(webview);
|
request.openIn(webview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HiFiControls.WebSpinner { }
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiControls.Keyboard {
|
HiFiControls.Keyboard {
|
||||||
|
|
|
@ -116,6 +116,8 @@ Item {
|
||||||
tabletRoot.openBrowserWindow(request, profile);
|
tabletRoot.openBrowserWindow(request, profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HiFiControls.WebSpinner { }
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiControls.Keyboard {
|
HiFiControls.Keyboard {
|
||||||
|
|
Loading…
Reference in a new issue