Merge pull request #7775 from ctrlaltdavid/20896

Use UI Toolkit border styles for various dialogs
This commit is contained in:
Brad Hefta-Gaub 2016-05-02 10:11:29 -07:00
commit 44fb572248
5 changed files with 62 additions and 31 deletions

View file

@ -1,8 +1,18 @@
//
// InfoView.qml
//
// Created by Bradley Austin Davis on 27 Apr 2015
// Copyright 2015 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
import Hifi 1.0 as Hifi
import "controls"
import "windows" as Windows
import "controls-uit"
import "windows-uit" as Windows
Windows.Window {
id: root
@ -12,16 +22,16 @@ Windows.Window {
Hifi.InfoView {
id: infoView
// Fill the client area
anchors.fill: parent
width: pane.contentWidth
implicitHeight: pane.scrollHeight
WebView {
id: webview
objectName: "WebView"
anchors.fill: parent
url: infoView.url
}
}
}
Component.onCompleted: {
centerWindow(root);

View file

@ -1,11 +1,21 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
//
// QmlWebWindow.qml
//
// Created by Bradley Austin Davis on 17 Dec 2015
// Copyright 2015 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
import QtQuick.Controls 1.4
import QtWebEngine 1.1
import QtWebChannel 1.0
import "windows" as Windows
import "controls" as Controls
import "styles"
import "windows-uit" as Windows
import "controls-uit" as Controls
import "styles-uit"
Windows.Window {
id: root
@ -29,11 +39,16 @@ Windows.Window {
// missing signal
signal sendToScript(var message);
Controls.WebView {
id: webview
url: "about:blank"
anchors.fill: parent
focus: true
webChannel.registeredObjects: [eventBridgeWrapper]
Item {
width: pane.contentWidth
implicitHeight: pane.scrollHeight
Controls.WebView {
id: webview
url: "about:blank"
anchors.fill: parent
focus: true
webChannel.registeredObjects: [eventBridgeWrapper]
}
}
} // dialog
}

View file

@ -15,6 +15,8 @@ WebEngineView {
id: root
property var newUrl;
profile.httpUserAgent: "Mozilla/5.0 Chrome (HighFidelityInterface)"
Component.onCompleted: {
console.log("Connecting JS messaging to Hifi Logging")
// Ensure the JS from the web-engine makes it to our logging

View file

@ -1,10 +1,20 @@
//
// AvatarBrowser.qml
//
// Created by Bradley Austin Davis on 30 Aug 2015
// Copyright 2015 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
import QtQuick.Controls 1.4
import QtWebEngine 1.1
import "../../windows" as Windows
import "../../controls" as Controls
import "../../styles"
import "../../windows-uit" as Windows
import "../../controls-uit" as Controls
import "../../styles-uit"
Windows.Window {
id: root
@ -14,20 +24,14 @@ Windows.Window {
modality: Qt.ApplicationModal
Item {
anchors.fill: parent
width: pane.contentWidth
implicitHeight: pane.scrollHeight
Controls.WebView {
id: webview
anchors { top: parent.top; left: parent.left; right: parent.right; bottom: closeButton.top; margins: 8 }
anchors.fill: parent
url: "https://metaverse.highfidelity.com/marketplace?category=avatars"
focus: true
}
Button {
id: closeButton
anchors { bottom: parent.bottom; right: parent.right; margins: 8 }
text: "Close"
onClicked: root.destroy();
}
}
}

View file

@ -17,7 +17,7 @@ var toolIconUrl = Script.resolvePath("assets/images/tools/");
var DIRECTORY_WINDOW_URL = "https://metaverse.highfidelity.com/directory";
var directoryWindow = new OverlayWebWindow({
title: 'directory',
title: 'Directory',
source: "about:blank",
width: 900,
height: 700,