From 083bf95917d42682cddd179ea24392d5ade3aedf Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 4 Jan 2017 16:25:13 -0800 Subject: [PATCH 1/3] Fix PAL scrollbar; add helper popup to ADMIN tab --- interface/resources/qml/hifi/Pal.qml | 72 ++++++++++++++++++- .../qml/styles-uit/HifiConstants.qml | 2 +- 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index 833cf4efe2..97b690cc55 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -104,6 +104,7 @@ Item { border.width: 2 // "ADMIN" text RalewaySemiBold { + id: adminTabText text: "ADMIN" // Text size size: hifi.fontSizes.tableHeading + 2 @@ -325,7 +326,7 @@ Item { visible: iAmAdmin color: hifi.colors.lightGrayText } - // This Rectangle refers to the [?] popup button + // This Rectangle refers to the [?] popup button next to "NAMES" Rectangle { color: hifi.colors.tableBackgroundLight width: 20 @@ -353,7 +354,36 @@ Item { onExited: helpText.color = hifi.colors.darkGray } } - // Explanitory popup upon clicking "[?]" + // This Rectangle refers to the [?] popup button next to "ADMIN" + Rectangle { + visible: iAmAdmin + color: adminTab.color + width: 20 + height: 28 + anchors.right: adminTab.right + anchors.rightMargin: 31 + anchors.top: adminTab.top + anchors.topMargin: 2 + RalewayRegular { + id: adminHelpText + text: "[?]" + size: hifi.fontSizes.tableHeading + 2 + font.capitalization: Font.AllUppercase + color: hifi.colors.redHighlight + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors.fill: parent + } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton + hoverEnabled: true + onClicked: adminPopup.visible = true + onEntered: adminHelpText.color = "#94132e" + onExited: adminHelpText.color = hifi.colors.redHighlight + } + } + // Explanitory popup upon clicking "[?]" next to "NAMES" Item { visible: false id: namesPopup @@ -392,6 +422,44 @@ Item { } } } + // Explanitory popup upon clicking "[?]" next to "ADMIN" + Item { + visible: false + id: adminPopup + anchors.fill: pal + Rectangle { + anchors.fill: parent + color: "black" + opacity: 0.5 + radius: hifi.dimensions.borderRadius + } + Rectangle { + width: Math.max(parent.width * 0.75, 400) + height: adminPopupText.contentHeight*1.5 + anchors.centerIn: parent + radius: hifi.dimensions.borderRadius + color: "white" + FiraSansSemiBold { + id: adminPopupText + text: 'Silencing a user mutes their microphone. Silenced users can unmute themselves by clicking the "MUTE" button on their HUD.\n\n' + + 'Banning a user will remove them from this domain and prevent them from returning. You can unban users from your domain's configuration page.' + size: hifi.fontSizes.textFieldInput + color: hifi.colors.darkGray + horizontalAlignment: Text.AlignHCenter + anchors.fill: parent + anchors.leftMargin: 15 + anchors.rightMargin: 15 + wrapMode: Text.WordWrap + } + } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: { + adminPopup.visible = false + } + } + } function findSessionIndex(sessionId, optionalData) { // no findIndex in .qml var data = optionalData || userModelData, length = data.length; diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index da1b2868a7..cb99dc6005 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -95,7 +95,7 @@ Item { readonly property color tableRowDarkEven: "#1c1c1c" // Equivalent to "#a6181818" over #404040 background readonly property color tableBackgroundLight: tableRowLightEven readonly property color tableBackgroundDark: tableRowDarkEven - readonly property color tableScrollHandleLight: tableRowLightOdd + readonly property color tableScrollHandleLight: "#8F8F8F" readonly property color tableScrollHandleDark: "#707070" readonly property color tableScrollBackgroundLight: tableRowLightEven readonly property color tableScrollBackgroundDark: "#323232" From 0c77ff25564dc1ad24dc7fc51b8fda23630e509b Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 4 Jan 2017 16:28:23 -0800 Subject: [PATCH 2/3] Fix silly quotation bug --- interface/resources/qml/hifi/Pal.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index 97b690cc55..d45145098d 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -442,7 +442,7 @@ Item { FiraSansSemiBold { id: adminPopupText text: 'Silencing a user mutes their microphone. Silenced users can unmute themselves by clicking the "MUTE" button on their HUD.\n\n' + - 'Banning a user will remove them from this domain and prevent them from returning. You can unban users from your domain's configuration page.' + "Banning a user will remove them from this domain and prevent them from returning. You can unban users from your domain's configuration page." size: hifi.fontSizes.textFieldInput color: hifi.colors.darkGray horizontalAlignment: Text.AlignHCenter From b5713656be0b47c18c4a09f442122236200e2412 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 5 Jan 2017 09:27:12 -0800 Subject: [PATCH 3/3] Minor language changes on Admin help text --- interface/resources/qml/hifi/Pal.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index d45145098d..8a583bfe4c 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -441,8 +441,8 @@ Item { color: "white" FiraSansSemiBold { id: adminPopupText - text: 'Silencing a user mutes their microphone. Silenced users can unmute themselves by clicking the "MUTE" button on their HUD.\n\n' + - "Banning a user will remove them from this domain and prevent them from returning. You can unban users from your domain's configuration page." + text: '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." size: hifi.fontSizes.textFieldInput color: hifi.colors.darkGray horizontalAlignment: Text.AlignHCenter