mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 04:57:23 +02:00
Make sliders appear only when row is selected
This commit is contained in:
parent
8343769352
commit
a89868dcad
2 changed files with 6 additions and 4 deletions
|
@ -34,6 +34,7 @@ Row {
|
||||||
property int usernameTextHeight: 12
|
property int usernameTextHeight: 12
|
||||||
property real audioLevel: 0.0
|
property real audioLevel: 0.0
|
||||||
property bool isMyCard: false
|
property bool isMyCard: false
|
||||||
|
property bool selected: false
|
||||||
|
|
||||||
/* User image commented out for now - will probably be re-introduced later.
|
/* User image commented out for now - will probably be re-introduced later.
|
||||||
Column {
|
Column {
|
||||||
|
@ -143,12 +144,12 @@ Row {
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 3
|
height: 3
|
||||||
visible: !isMyCard
|
visible: !isMyCard && selected
|
||||||
}
|
}
|
||||||
// Per-Avatar Gain Slider
|
// Per-Avatar Gain Slider
|
||||||
Slider {
|
Slider {
|
||||||
id: gainSlider
|
id: gainSlider
|
||||||
visible: !isMyCard
|
visible: !isMyCard && selected
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 18
|
height: 18
|
||||||
value: pal.gainSliderValueDB[uuid] ? pal.gainSliderValueDB[uuid] : 0.0
|
value: pal.gainSliderValueDB[uuid] ? pal.gainSliderValueDB[uuid] : 0.0
|
||||||
|
|
|
@ -25,7 +25,7 @@ Rectangle {
|
||||||
color: "#E3E3E3"
|
color: "#E3E3E3"
|
||||||
// Properties
|
// Properties
|
||||||
property int myCardHeight: 90
|
property int myCardHeight: 90
|
||||||
property int rowHeight: 80
|
property int rowHeight: 70
|
||||||
property int actionButtonWidth: 75
|
property int actionButtonWidth: 75
|
||||||
property int nameCardWidth: palContainer.width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4 - hifi.dimensions.scrollbarBackgroundWidth
|
property int nameCardWidth: palContainer.width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4 - hifi.dimensions.scrollbarBackgroundWidth
|
||||||
property var myData: ({displayName: "", userName: "", audioLevel: 0.0}) // valid dummy until set
|
property var myData: ({displayName: "", userName: "", audioLevel: 0.0}) // valid dummy until set
|
||||||
|
@ -190,7 +190,7 @@ Rectangle {
|
||||||
// This Rectangle refers to each Row in the table.
|
// This Rectangle refers to each Row in the table.
|
||||||
rowDelegate: Rectangle { // The only way I know to specify a row height.
|
rowDelegate: Rectangle { // The only way I know to specify a row height.
|
||||||
// Size
|
// Size
|
||||||
height: rowHeight
|
height: rowHeight + (styleData.selected ? 20 : 0)
|
||||||
color: styleData.selected
|
color: styleData.selected
|
||||||
? hifi.colors.orangeHighlight
|
? hifi.colors.orangeHighlight
|
||||||
: styleData.alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd
|
: styleData.alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd
|
||||||
|
@ -211,6 +211,7 @@ Rectangle {
|
||||||
audioLevel: model && model.audioLevel
|
audioLevel: model && model.audioLevel
|
||||||
visible: !isCheckBox && !isButton
|
visible: !isCheckBox && !isButton
|
||||||
uuid: model && model.sessionId
|
uuid: model && model.sessionId
|
||||||
|
selected: styleData.selected
|
||||||
// Size
|
// Size
|
||||||
width: nameCardWidth
|
width: nameCardWidth
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
Loading…
Reference in a new issue