mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Gotta fix these bugs...
This commit is contained in:
parent
10b5b957f2
commit
f96508e197
2 changed files with 38 additions and 19 deletions
|
@ -27,7 +27,9 @@ Original.CheckBox {
|
||||||
readonly property int checkRadius: 2
|
readonly property int checkRadius: 2
|
||||||
|
|
||||||
style: CheckBoxStyle {
|
style: CheckBoxStyle {
|
||||||
indicator: Rectangle {
|
indicator:
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
id: box
|
id: box
|
||||||
width: boxSize
|
width: boxSize
|
||||||
height: 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 {
|
Rectangle {
|
||||||
visible: pressed || hovered
|
visible: pressed || hovered
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
|
@ -40,7 +40,7 @@ Item {
|
||||||
property int myCardHeight: 70
|
property int myCardHeight: 70
|
||||||
property int rowHeight: 70
|
property int rowHeight: 70
|
||||||
property int actionButtonWidth: 75
|
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
|
// This contains the current user's NameCard and will contain other information in the future
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -85,7 +85,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: adminTab
|
id: adminTab
|
||||||
// Size
|
// Size
|
||||||
width: actionButtonWidth * 2 - 2
|
width: actionButtonWidth * 2 + 2
|
||||||
height: 40
|
height: 40
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.bottom: myInfo.bottom
|
anchors.bottom: myInfo.bottom
|
||||||
|
@ -116,6 +116,19 @@ Item {
|
||||||
verticalAlignment: Text.AlignTop
|
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)
|
// This TableView refers to the table (below the current user's NameCard)
|
||||||
HifiControls.Table {
|
HifiControls.Table {
|
||||||
id: table
|
id: table
|
||||||
|
@ -191,7 +204,7 @@ Item {
|
||||||
// Properties
|
// Properties
|
||||||
displayName: styleData.value
|
displayName: styleData.value
|
||||||
userName: model && model.userName
|
userName: model && model.userName
|
||||||
audioLevel: model.audioLevel
|
audioLevel: model && model.audioLevel
|
||||||
visible: !isCheckBox
|
visible: !isCheckBox
|
||||||
// Size
|
// Size
|
||||||
width: nameCardWidth
|
width: nameCardWidth
|
||||||
|
@ -202,12 +215,16 @@ Item {
|
||||||
|
|
||||||
// This CheckBox belongs in the columns that contain the action buttons ("Mute", "Ban", etc)
|
// This CheckBox belongs in the columns that contain the action buttons ("Mute", "Ban", etc)
|
||||||
HifiControls.CheckBox {
|
HifiControls.CheckBox {
|
||||||
visible: styleData.role === "personalMute" ? (model["ignore"] === true ? false : true) : isCheckBox
|
visible: isCheckBox
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
checked: model[styleData.role]
|
checked: model && model[styleData.role]
|
||||||
|
enabled: styleData.role === "personalMute" ? (model["ignore"] === true ? false : true) : true
|
||||||
boxSize: 24
|
boxSize: 24
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newValue = !model[styleData.role]
|
var newValue = !model[styleData.role]
|
||||||
|
if (newValue === undefined) {
|
||||||
|
newValue = false
|
||||||
|
}
|
||||||
var datum = userData[model.userIndex]
|
var datum = userData[model.userIndex]
|
||||||
datum[styleData.role] = model[styleData.role] = newValue
|
datum[styleData.role] = model[styleData.role] = newValue
|
||||||
if (styleData.role === "personalMute" || styleData.role === "ignore") {
|
if (styleData.role === "personalMute" || styleData.role === "ignore") {
|
||||||
|
@ -264,19 +281,6 @@ Item {
|
||||||
onExited: reloadButton.color = (pressed ? hifi.colors.lightGrayText: hifi.colors.darkGray)
|
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
|
// This Rectangle refers to the [?] popup button
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: hifi.colors.tableBackgroundLight
|
color: hifi.colors.tableBackgroundLight
|
||||||
|
|
Loading…
Reference in a new issue