Gotta fix these bugs...

This commit is contained in:
Zach Fox 2016-12-29 14:19:40 -08:00
parent 10b5b957f2
commit f96508e197
2 changed files with 38 additions and 19 deletions

View file

@ -27,7 +27,9 @@ Original.CheckBox {
readonly property int checkRadius: 2
style: CheckBoxStyle {
indicator: Rectangle {
indicator:
Rectangle {
id: box
width: boxSize
height: boxSize
@ -51,6 +53,19 @@ Original.CheckBox {
}
}
Rectangle {
id: disabledOverlay
visible: !enabled
z: 100
width: boxSize
height: boxSize
radius: boxRadius
border.width: 1
border.color: hifi.colors.baseGrayHighlight
color: hifi.colors.baseGrayHighlight
opacity: 0.5
}
Rectangle {
visible: pressed || hovered
anchors.centerIn: parent

View file

@ -40,7 +40,7 @@ Item {
property int myCardHeight: 70
property int rowHeight: 70
property int actionButtonWidth: 75
property int nameCardWidth: width - actionButtonWidth*(iAmAdmin ? 4 : 2)
property int nameCardWidth: width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4
// This contains the current user's NameCard and will contain other information in the future
Rectangle {
@ -85,7 +85,7 @@ Item {
Rectangle {
id: adminTab
// Size
width: actionButtonWidth * 2 - 2
width: actionButtonWidth * 2 + 2
height: 40
// Anchors
anchors.bottom: myInfo.bottom
@ -116,6 +116,19 @@ Item {
verticalAlignment: Text.AlignTop
}
}
// Separator between user and admin functions
Rectangle {
// Size
width: 2
height: table.height
// Anchors
anchors.left: adminTab.left
anchors.top: table.top
// Properties
z: 100
visible: iAmAdmin
color: hifi.colors.lightGrayText
}
// This TableView refers to the table (below the current user's NameCard)
HifiControls.Table {
id: table
@ -191,7 +204,7 @@ Item {
// Properties
displayName: styleData.value
userName: model && model.userName
audioLevel: model.audioLevel
audioLevel: model && model.audioLevel
visible: !isCheckBox
// Size
width: nameCardWidth
@ -202,12 +215,16 @@ Item {
// This CheckBox belongs in the columns that contain the action buttons ("Mute", "Ban", etc)
HifiControls.CheckBox {
visible: styleData.role === "personalMute" ? (model["ignore"] === true ? false : true) : isCheckBox
visible: isCheckBox
anchors.centerIn: parent
checked: model[styleData.role]
checked: model && model[styleData.role]
enabled: styleData.role === "personalMute" ? (model["ignore"] === true ? false : true) : true
boxSize: 24
onClicked: {
var newValue = !model[styleData.role]
if (newValue === undefined) {
newValue = false
}
var datum = userData[model.userIndex]
datum[styleData.role] = model[styleData.role] = newValue
if (styleData.role === "personalMute" || styleData.role === "ignore") {
@ -264,19 +281,6 @@ Item {
onExited: reloadButton.color = (pressed ? hifi.colors.lightGrayText: hifi.colors.darkGray)
}
}
// Separator between user and admin functions
Rectangle {
// Size
width: 2
height: table.height
// Anchors
anchors.left: adminTab.left
anchors.top: table.top
// Properties
visible: iAmAdmin
color: hifi.colors.lightGrayText
}
// This Rectangle refers to the [?] popup button
Rectangle {
color: hifi.colors.tableBackgroundLight