Make the change

This commit is contained in:
Zach Fox 2017-05-03 14:57:31 -07:00
parent 4a8f5e380f
commit 066b2db73f
2 changed files with 11 additions and 132 deletions

View file

@ -308,6 +308,7 @@ Item {
Component.onCompleted: {
web.isDesktop = (typeof desktop !== "undefined");
address = url;
console.log("FIXME", eventBridge);
}
Keys.onPressed: {

View file

@ -44,6 +44,7 @@ Rectangle {
property var activeTab: "nearbyTab";
property bool currentlyEditingDisplayName: false
property bool punctuationMode: false;
property var eventBridge;
HifiConstants { id: hifi; }
@ -1036,139 +1037,16 @@ Rectangle {
}
} // Keyboard
Item {
id: webViewContainer;
anchors.fill: parent;
Rectangle {
id: navigationContainer;
visible: userInfoViewer.visible;
height: 60;
anchors {
top: parent.top;
left: parent.left;
right: parent.right;
}
color: hifi.colors.faintGray;
Item {
id: backButton
anchors {
top: parent.top;
left: parent.left;
}
height: parent.height - addressBar.height;
width: parent.width/2;
FiraSansSemiBold {
// Properties
text: "BACK";
elide: Text.ElideRight;
// Anchors
anchors.fill: parent;
// Text Size
size: 16;
// Text Positioning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter;
// Style
color: backButtonMouseArea.containsMouse || !userInfoViewer.canGoBack ? hifi.colors.lightGray : hifi.colors.darkGray;
MouseArea {
id: backButtonMouseArea;
anchors.fill: parent
hoverEnabled: enabled
onClicked: {
if (userInfoViewer.canGoBack) {
userInfoViewer.goBack();
}
}
}
}
}
Item {
id: closeButtonContainer
anchors {
top: parent.top;
right: parent.right;
}
height: parent.height - addressBar.height;
width: parent.width/2;
FiraSansSemiBold {
id: closeButton;
// Properties
text: "CLOSE";
elide: Text.ElideRight;
// Anchors
anchors.fill: parent;
// Text Size
size: 16;
// Text Positioning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter;
// Style
color: hifi.colors.redHighlight;
MouseArea {
anchors.fill: parent
hoverEnabled: enabled
onClicked: userInfoViewer.visible = false;
onEntered: closeButton.color = hifi.colors.redAccent;
onExited: closeButton.color = hifi.colors.redHighlight;
}
}
}
Item {
id: addressBar
anchors {
top: closeButtonContainer.bottom;
left: parent.left;
right: parent.right;
}
height: 30;
width: parent.width;
FiraSansRegular {
// Properties
text: userInfoViewer.url;
elide: Text.ElideRight;
// Anchors
anchors.fill: parent;
anchors.leftMargin: 5;
// Text Size
size: 14;
// Text Positioning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft;
// Style
color: hifi.colors.lightGray;
}
}
}
Rectangle {
id: webViewBackground;
color: "white";
visible: userInfoViewer.visible;
anchors {
top: navigationContainer.bottom;
bottom: parent.bottom;
left: parent.left;
right: parent.right;
}
}
HifiControls.WebView {
id: userInfoViewer;
anchors {
top: navigationContainer.bottom;
bottom: parent.bottom;
left: parent.left;
right: parent.right;
}
visible: false;
HifiControls.TabletWebView {
eventBridge: pal.eventBridge;
id: userInfoViewer;
anchors {
top: parent.top;
bottom: parent.bottom;
left: parent.left;
right: parent.right;
}
visible: false;
}
// Timer used when selecting nearbyTable rows that aren't yet present in the model