mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:43:53 +02:00
Popups wow!
This commit is contained in:
parent
db2da8f06b
commit
5b77202c52
3 changed files with 58 additions and 5 deletions
BIN
interface/resources/icons/defaultNameCardUser.png
Normal file
BIN
interface/resources/icons/defaultNameCardUser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
|
@ -38,11 +38,11 @@ Row {
|
|||
// Size
|
||||
height: contentHeight;
|
||||
width: height;
|
||||
Rectangle {
|
||||
radius: parent.width*0.5;
|
||||
color: "#AAA5AD";
|
||||
Image {
|
||||
id: userImage;
|
||||
source: "../../icons/defaultNameCardUser.png"
|
||||
// Anchors
|
||||
width: parent.width
|
||||
width: parent.width;
|
||||
height: parent.height;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ Item {
|
|||
HifiControls.Table {
|
||||
id: table;
|
||||
// Size
|
||||
height: pal.height - myInfo.height;
|
||||
height: pal.height - myInfo.height - 4;
|
||||
width: pal.width - 4;
|
||||
// Anchors
|
||||
anchors.left: parent.left;
|
||||
|
@ -195,6 +195,59 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
// This Rectangle refers to the [?] popup button
|
||||
Rectangle {
|
||||
color: hifi.colors.tableBackgroundLight;
|
||||
width: 18;
|
||||
height: hifi.dimensions.tableHeaderHeight - 2;
|
||||
anchors.left: table.left;
|
||||
anchors.top: table.top;
|
||||
anchors.topMargin: 1;
|
||||
anchors.leftMargin: nameCardWidth/2 + 23;
|
||||
RalewayRegular {
|
||||
id: helpText;
|
||||
text: "[?]";
|
||||
size: hifi.fontSizes.tableHeading;
|
||||
font.capitalization: Font.AllUppercase;
|
||||
color: hifi.colors.darkGray;
|
||||
horizontalAlignment: Text.AlignHCenter;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
anchors.fill: parent;
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
acceptedButtons: Qt.LeftButton;
|
||||
hoverEnabled: true;
|
||||
onClicked: namesPopup.visible = true;
|
||||
onEntered: helpText.color = hifi.colors.baseGrayHighlight;
|
||||
onExited: helpText.color = hifi.colors.darkGray;
|
||||
}
|
||||
}
|
||||
// Explanitory popup upon clicking "[?]"
|
||||
Item {
|
||||
visible: false;
|
||||
id: namesPopup;
|
||||
anchors.fill: pal;
|
||||
Rectangle {
|
||||
anchors.fill: parent;
|
||||
color: "black";
|
||||
opacity: 0.5;
|
||||
radius: hifi.dimensions.borderRadius;
|
||||
}
|
||||
Rectangle {
|
||||
width: 400;
|
||||
height: 200;
|
||||
anchors.centerIn: parent;
|
||||
color: "black";
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
acceptedButtons: Qt.LeftButton;
|
||||
onClicked: {
|
||||
namesPopup.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property var userData: [];
|
||||
property var myData: ({displayName: "", userName: ""}); // valid dummy until set
|
||||
|
|
Loading…
Reference in a new issue