Merging from PAL_v2_Zach

This commit is contained in:
Zach Fox 2017-03-13 12:54:01 -07:00
parent e2e7573e93
commit d04b1da1c2
2 changed files with 132 additions and 11 deletions
interface/resources/qml/hifi

View file

@ -91,10 +91,8 @@ Item {
enabled: selected || isMyCard;
hoverEnabled: enabled
onClicked: {
/*
THIS WILL OPEN THE BROWSER TO THE USER'S INFO PAGE!
I've no idea how to do this yet..
*/
userInfoViewer.url = "http://highfidelity.com/users/" + (pal.activeTab == "nearbyTab" ? userName : displayName); // Connections tab puts username in "displayname" field
userInfoViewer.visible = true;
}
}
}

View file

@ -934,15 +934,138 @@ Rectangle {
}
} // Keyboard
/*
THIS WILL BE THE BROWSER THAT OPENS THE USER'S INFO PAGE!
I've no idea how to do this yet..
Item {
id: webViewContainer;
anchors.fill: parent;
HifiTablet.TabletAddressDialog {
id: userInfoViewer;
visible: false;
Rectangle {
id: navigationContainer;
visible: userInfoViewer.visible;
height: 75;
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 - urlBar.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: userInfoViewer.goBack();
}
}
}
Item {
id: closeButton
anchors {
top: parent.top;
right: parent.right;
}
height: parent.height - urlBar.height;
width: parent.width/2;
FiraSansSemiBold {
// Properties
text: "CLOSE";
elide: Text.ElideRight;
// Anchors
anchors.fill: parent;
// Text Size
size: 16;
// Text Positioning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter;
// Style
color: closeButtonMouseArea.containsMouse ? hifi.colors.lightGray : hifi.colors.darkGray;
MouseArea {
id: closeButtonMouseArea;
anchors.fill: parent
hoverEnabled: enabled
onClicked: userInfoViewer.visible = false;
}
}
}
Item {
id: urlBar
anchors {
top: closeButton.bottom;
left: parent.left;
right: parent.right;
}
height: 25;
width: parent.width;
FiraSansRegular {
// Properties
text: userInfoViewer.url;
elide: Text.ElideRight;
// Anchors
anchors.fill: parent;
// Text Size
size: 14;
// Text Positioning
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter;
// Style
color: hifi.colors.lightGray;
MouseArea {
anchors.fill: parent
onClicked: userInfoViewer.visible = false;
}
}
}
}
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;
topMargin: 5;
bottom: parent.bottom;
left: parent.left;
right: parent.right;
}
visible: false;
}
}
*/
} // PAL container