From 0be4db1e68ba2fecd8dc090aa32c5f77b1f0dc05 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 20 Dec 2016 14:28:49 -0800 Subject: [PATCH] Checkboxes! --- .../resources/qml/controls-uit/CheckBox.qml | 2 +- interface/resources/qml/hifi/NameCard.qml | 2 +- interface/resources/qml/hifi/Pal.qml | 32 ++++++++----------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/interface/resources/qml/controls-uit/CheckBox.qml b/interface/resources/qml/controls-uit/CheckBox.qml index 544609b478..a3050df22a 100644 --- a/interface/resources/qml/controls-uit/CheckBox.qml +++ b/interface/resources/qml/controls-uit/CheckBox.qml @@ -21,7 +21,7 @@ Original.CheckBox { property int colorScheme: hifi.colorSchemes.light readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - readonly property int boxSize: 14 + property int boxSize: 14 readonly property int boxRadius: 3 readonly property int checkSize: 10 readonly property int checkRadius: 2 diff --git a/interface/resources/qml/hifi/NameCard.qml b/interface/resources/qml/hifi/NameCard.qml index 052b17f99d..56fa0521ae 100644 --- a/interface/resources/qml/hifi/NameCard.qml +++ b/interface/resources/qml/hifi/NameCard.qml @@ -67,7 +67,7 @@ Row { } // UserName Text - FiraSansSemiBold { + FiraSansRegular { id: userNameText; // Properties text: thisNameCard.userName; diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index 0bcff94739..3a7c3d45b7 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -172,25 +172,21 @@ Item { // Anchors anchors.left: parent.left; } - // This Rectangle refers to the cells that contain the action buttons - Rectangle { - radius: itemCell.height / 4; + + // This CheckBox belongs in the columns that contain the action buttons ("Mute", "Ban", etc) + HifiControls.CheckBox { visible: isCheckBox && !isSeparator; - color: styleData.value ? "green" : "red"; - anchors.fill: parent; - MouseArea { - anchors.fill: parent; - acceptedButtons: Qt.LeftButton; - hoverEnabled: true; - onClicked: { - var newValue = !model[styleData.role]; - var datum = userData[model.userIndex]; - datum[styleData.role] = model[styleData.role] = newValue; - Users[styleData.role](model.sessionId); - // Just for now, while we cannot undo things: - userData.splice(model.userIndex, 1); - sortModel(); - } + anchors.centerIn: parent; + colorScheme: hifi.colorSchemes.dark; + boxSize: 22; + onClicked: { + var newValue = !model[styleData.role]; + var datum = userData[model.userIndex]; + datum[styleData.role] = model[styleData.role] = newValue; + Users[styleData.role](model.sessionId); + // Just for now, while we cannot undo things: + userData.splice(model.userIndex, 1); + sortModel(); } } }