Checkpoint

This commit is contained in:
Zach Fox 2017-01-17 17:39:13 -08:00
parent 202d4e8107
commit 9d19aa3c79
3 changed files with 65 additions and 57 deletions

View file

@ -19,6 +19,7 @@ Item {
property alias headerText: headerText.text
property real popupRadius: hifi.dimensions.borderRadius
property real headerTextPixelSize: 22
property real popupTextPixelSize: 16
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; }
FontLoader { id: ralewaySemiBold; source: "../../fonts/Raleway-SemiBold.ttf"; }
visible: false
@ -32,73 +33,76 @@ Item {
}
Rectangle {
width: Math.max(parent.width * 0.75, 400)
height: contentContainer.height*1.5
height: childrenRect.height + 50
anchors.centerIn: parent
radius: popupRadius
color: "white"
Item {
Column {
id: contentContainer
width: parent.width - 60
anchors.centerIn: parent
anchors.margins: 20
height: childrenRect.height
Item {
spacing: 20
Row {
id: popupHeaderContainer
visible: headerText.text !== "" || glyphText.text !== ""
// Size
width: parent.width
height: childrenRect.height
// Anchors
anchors.top: parent.top
anchors.left: parent.left
// Header Glyph
HiFiGlyphs {
id: headerGlyph
visible: headerText.text !== ""
// Text Size
size: headerTextPixelSize * 2.5
// Anchors
anchors.top: parent.top
anchors.left: parent.left
anchors.rightMargin: 5
// Style
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: hifi.colors.darkGray
visible: headerText.text !== "" || headerGlyph.text !== ""
height: 30
Column {
// Header Glyph
HiFiGlyphs {
id: headerGlyph
visible: headerGlyph.text !== ""
// Size
height: parent.parent.height
// Anchors
anchors.left: parent.left
anchors.leftMargin: -15
// Text Size
size: headerTextPixelSize*2.5
// Style
horizontalAlignment: Text.AlignHLeft
verticalAlignment: Text.AlignVCenter
color: hifi.colors.darkGray
}
}
Column {
// Header Text
Text {
id: headerText
visible: headerText.text !== ""
// Size
height: parent.parent.height
// Anchors
anchors.left: parent.left
anchors.leftMargin: -15
// Text Size
font.pixelSize: headerTextPixelSize
// Style
font.family: ralewaySemiBold.name
color: hifi.colors.darkGray
horizontalAlignment: Text.AlignHLeft
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
textFormat: Text.StyledText
}
}
}
Row {
// Popup Text
Text {
id: headerText
visible: headerGlyph.text !== ""
// Text Size
font.pixelSize: headerTextPixelSize
// Anchors
anchors.top: parent.top
anchors.left: headerGlyph.right
// Style
font.family: ralewaySemiBold.name
color: hifi.colors.darkGray
id: popupText
// Size
width: parent.parent.width
// Text alignment
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
horizontalAlignment: Text.AlignHLeft
// Style
font.pixelSize: popupTextPixelSize
font.family: ralewayRegular.name
color: hifi.colors.darkGray
wrapMode: Text.WordWrap
textFormat: Text.StyledText
}
}
Text {
id: popupText
// Anchors
anchors.top: popupHeaderContainer.visible ? popupHeaderContainer.anchors.bottom : parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
// Text alignment
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
// Style
font.pixelSize: hifi.fontSizes.textFieldInput
font.family: ralewayRegular.name
color: hifi.colors.darkGray
wrapMode: Text.WordWrap
textFormat: Text.StyledText
}
}
}
MouseArea {

View file

@ -220,7 +220,9 @@ Item {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
hoverEnabled: true
onClicked: letterbox("This user is an admin on this domain. Admins can <b>Silence</b> and <b>Ban</b> other users at their discretion - so be extra nice!", hifi.glyphs.question, "Domain Admin")
onClicked: letterbox("This user is an admin on this domain. Admins can <b>Silence</b> and <b>Ban</b> other users at their discretion - so be extra nice!",
hifi.glyphs.question,
"Domain Admin")
onEntered: adminLabelQuestionMarkText.color = "#94132e"
onExited: adminLabelQuestionMarkText.color = hifi.colors.redHighlight
}

View file

@ -403,8 +403,10 @@ Rectangle {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
hoverEnabled: true
onClicked: letterbox('Silencing a user mutes their microphone. Silenced users can unmute themselves by clicking the "UNMUTE" button on their HUD.\n\n' +
"Banning a user will remove them from this domain and prevent them from returning. You can un-ban users from your domain's settings page.)", "", "")
onClicked: letterbox("<b>Silence</b> mutes a user's microphone. Silenced users can unmute themselves by clicking &quot;UNMUTE&quot; on their toolbar.<br><br>" +
"<b>Ban</b> removes a user from this domain and prevents them from returning. Admins can un-ban users from the Sandbox Domain Settings Page.)",
hifi.glyphs.question,
"Admin Actions")
onEntered: adminHelpText.color = "#94132e"
onExited: adminHelpText.color = hifi.colors.redHighlight
}