mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:57:30 +02:00
goto on the tablet
This commit is contained in:
parent
a078121c46
commit
d9046a1982
3 changed files with 190 additions and 52 deletions
|
@ -129,7 +129,7 @@ Rectangle {
|
||||||
property int dropSamples: 9;
|
property int dropSamples: 9;
|
||||||
property int dropSpread: 0;
|
property int dropSpread: 0;
|
||||||
DropShadow {
|
DropShadow {
|
||||||
visible: showPlace && (desktop ? desktop.gradientsSupported : false)
|
visible: true;//showPlace && (desktop ? desktop.gradientsSupported : false)
|
||||||
source: place;
|
source: place;
|
||||||
anchors.fill: place;
|
anchors.fill: place;
|
||||||
horizontalOffset: dropHorizontalOffset;
|
horizontalOffset: dropHorizontalOffset;
|
||||||
|
@ -139,12 +139,12 @@ Rectangle {
|
||||||
color: hifi.colors.black;
|
color: hifi.colors.black;
|
||||||
spread: dropSpread;
|
spread: dropSpread;
|
||||||
}
|
}
|
||||||
RalewaySemiBold {
|
RalewayLight {
|
||||||
id: place;
|
id: place;
|
||||||
visible: showPlace;
|
visible: showPlace;
|
||||||
text: placeName;
|
text: placeName;
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
size: textSize;
|
size: 38;
|
||||||
elide: Text.ElideRight; // requires constrained width
|
elide: Text.ElideRight; // requires constrained width
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
|
@ -154,9 +154,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
radius: 20
|
|
||||||
color: "transparent"
|
|
||||||
Row {
|
Row {
|
||||||
FiraSansRegular {
|
FiraSansRegular {
|
||||||
id: users;
|
id: users;
|
||||||
|
@ -196,7 +193,6 @@ Rectangle {
|
||||||
leftMargin: textPadding;
|
leftMargin: textPadding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// These two can be supplied to provide hover behavior.
|
// These two can be supplied to provide hover behavior.
|
||||||
// For example, AddressBarDialog provides functions that set the current list view item
|
// For example, AddressBarDialog provides functions that set the current list view item
|
||||||
// to that which is being hovered over.
|
// to that which is being hovered over.
|
||||||
|
@ -221,6 +217,12 @@ Rectangle {
|
||||||
margins: smallMargin;
|
margins: smallMargin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DropShadow {
|
||||||
|
anchors.fill: actionIcon
|
||||||
|
radius: 8.0
|
||||||
|
color: "#80000000"
|
||||||
|
source: actionIcon
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: messageArea;
|
id: messageArea;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//
|
//
|
||||||
// TabletAddressDialog.qml
|
// TabletAddressDialog.qml
|
||||||
//
|
//
|
||||||
// Created by Dante Ruiz on 2016/07/16
|
// Created by Dante Ruiz on 2017/03/16
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
@ -9,7 +9,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Hifi 1.0
|
import Hifi 1.0
|
||||||
import QtQuick 2.4
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import "../../controls"
|
import "../../controls"
|
||||||
import "../../styles"
|
import "../../styles"
|
||||||
|
@ -19,11 +20,11 @@ import "../toolbars"
|
||||||
import "../../styles-uit" as HifiStyles
|
import "../../styles-uit" as HifiStyles
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
||||||
Item {
|
StackView {
|
||||||
id: root
|
id: root
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
HifiStyles.HifiConstants { id: hifiStyleConstants }
|
HifiStyles.HifiConstants { id: hifiStyleConstants }
|
||||||
|
initialItem: addressBarDialog
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ Item {
|
||||||
property int cardHeight: 320;
|
property int cardHeight: 320;
|
||||||
property string metaverseBase: addressBarDialog.metaverseServerUrl + "/api/v1/";
|
property string metaverseBase: addressBarDialog.metaverseServerUrl + "/api/v1/";
|
||||||
|
|
||||||
|
Component { id: tabletStoryCard; TabletStoryCard {} }
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
fillDestinations();
|
fillDestinations();
|
||||||
updateLocationText();
|
updateLocationText();
|
||||||
|
@ -54,6 +55,9 @@ Item {
|
||||||
}
|
}
|
||||||
function goCard(targetString) {
|
function goCard(targetString) {
|
||||||
if (0 !== targetString.indexOf('hifi://')) {
|
if (0 !== targetString.indexOf('hifi://')) {
|
||||||
|
var card = tabletStoryCard.createObject();
|
||||||
|
card.setUrl(addressBarDialog.metaverseServerUrl + targetString);
|
||||||
|
root.push(card);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addressLine.text = targetString;
|
addressLine.text = targetString;
|
||||||
|
@ -86,7 +90,7 @@ Item {
|
||||||
id: navBar
|
id: navBar
|
||||||
width: 480
|
width: 480
|
||||||
height: 70
|
height: 70
|
||||||
color: hifi.colors.white
|
color: hifiStyleConstants.colors.white
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
@ -194,7 +198,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
isCursorVisible = true;
|
isCursorVisible = true;
|
||||||
//parent.cursorVisible = true;
|
parent.cursorVisible = true;
|
||||||
parent.forceActiveFocus();
|
parent.forceActiveFocus();
|
||||||
addressBarDialog.keyboardEnabled = HMD.active
|
addressBarDialog.keyboardEnabled = HMD.active
|
||||||
tabletRoot.playButtonClickSound();
|
tabletRoot.playButtonClickSound();
|
||||||
|
@ -204,14 +208,14 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: addressLine
|
anchors.fill: addressLine
|
||||||
color: hifiStyleConstants.colors.baseGray
|
color: hifiStyleConstants.colors.lightGray
|
||||||
opacity: 0.1
|
opacity: 0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: topBar
|
id: topBar
|
||||||
height: 37
|
height: 37
|
||||||
color: hifi.colors.white
|
color: hifiStyleConstants.colors.white
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
|
@ -260,7 +264,7 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: bgMain
|
id: bgMain
|
||||||
color: hifi.colors.white
|
color: hifiStyleConstants.colors.white
|
||||||
anchors.bottom: parent.keyboardEnabled ? keyboard.top : parent.bottom
|
anchors.bottom: parent.keyboardEnabled ? keyboard.top : parent.bottom
|
||||||
anchors.bottomMargin: 0
|
anchors.bottomMargin: 0
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
132
interface/resources/qml/hifi/tablet/TabletStoryCard.qml
Normal file
132
interface/resources/qml/hifi/tablet/TabletStoryCard.qml
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
//
|
||||||
|
// TabletAddressDialog.qml
|
||||||
|
//
|
||||||
|
// Created by Dante Ruiz on 2017/04/24
|
||||||
|
// 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 Hifi 1.0
|
||||||
|
import QtQuick 2.4
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import "../../controls"
|
||||||
|
import "../../styles"
|
||||||
|
import "../../windows"
|
||||||
|
import "../"
|
||||||
|
import "../toolbars"
|
||||||
|
import "../../styles-uit" as HifiStyles
|
||||||
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: cardRoot
|
||||||
|
HifiStyles.HifiConstants { id: hifi }
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
property string address: ""
|
||||||
|
|
||||||
|
function setUrl(url) {
|
||||||
|
cardRoot.address = url;
|
||||||
|
webview.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
function goBack() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function visit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: header
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
top: parent.top
|
||||||
|
}
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: 50
|
||||||
|
color: hifi.colors.white
|
||||||
|
|
||||||
|
Row {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 80
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: backButton
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 100
|
||||||
|
}
|
||||||
|
height: parent.height
|
||||||
|
width: parent.height
|
||||||
|
|
||||||
|
HifiStyles.FiraSansSemiBold {
|
||||||
|
text: "BACK"
|
||||||
|
elide: Text.ElideRight
|
||||||
|
anchors.fill: parent
|
||||||
|
size: 16
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: hifi.colors.lightGray
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: backButtonMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: enabled
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
webview.goBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: closeButton
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 100
|
||||||
|
}
|
||||||
|
height: parent.height
|
||||||
|
width: parent.height
|
||||||
|
|
||||||
|
HifiStyles.FiraSansSemiBold {
|
||||||
|
text: "CLOSE"
|
||||||
|
elide: Text.ElideRight
|
||||||
|
anchors.fill: parent
|
||||||
|
size: 16
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: hifi.colors.lightGray
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: closeButtonMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: enabled
|
||||||
|
|
||||||
|
onClicked: root.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HifiControls.WebView {
|
||||||
|
id: webview
|
||||||
|
anchors {
|
||||||
|
top: header.bottom
|
||||||
|
right: parent.right
|
||||||
|
left: parent.left
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue