mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:17:34 +02:00
Final tweaks before PR!
This commit is contained in:
parent
a89868dcad
commit
a5343d9aa9
2 changed files with 54 additions and 21 deletions
|
@ -15,10 +15,8 @@ import QtQuick.Controls.Styles 1.4
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Row {
|
Item {
|
||||||
id: thisNameCard
|
id: thisNameCard
|
||||||
// Spacing
|
|
||||||
spacing: 10
|
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
@ -51,10 +49,11 @@ Row {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
Column {
|
Item {
|
||||||
id: textContainer
|
id: textContainer
|
||||||
// Size
|
// Size
|
||||||
width: parent.width - /*avatarImage.width - parent.spacing - */parent.anchors.leftMargin - parent.anchors.rightMargin
|
width: parent.width - /*avatarImage.width - parent.spacing - */parent.anchors.leftMargin - parent.anchors.rightMargin
|
||||||
|
height: childrenRect.height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
// DisplayName Text
|
// DisplayName Text
|
||||||
FiraSansSemiBold {
|
FiraSansSemiBold {
|
||||||
|
@ -64,6 +63,8 @@ Row {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
// Size
|
// Size
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
// Anchors
|
||||||
|
anchors.top: parent.top
|
||||||
// Text Size
|
// Text Size
|
||||||
size: thisNameCard.displayTextHeight
|
size: thisNameCard.displayTextHeight
|
||||||
// Text Positioning
|
// Text Positioning
|
||||||
|
@ -81,6 +82,8 @@ Row {
|
||||||
visible: thisNameCard.displayName
|
visible: thisNameCard.displayName
|
||||||
// Size
|
// Size
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
// Anchors
|
||||||
|
anchors.top: displayNameText.bottom
|
||||||
// Text Size
|
// Text Size
|
||||||
size: thisNameCard.usernameTextHeight
|
size: thisNameCard.usernameTextHeight
|
||||||
// Text Positioning
|
// Text Positioning
|
||||||
|
@ -91,25 +94,56 @@ Row {
|
||||||
|
|
||||||
// Spacer
|
// Spacer
|
||||||
Item {
|
Item {
|
||||||
height: 3
|
id: spacer
|
||||||
|
height: 4
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
// Anchors
|
||||||
|
anchors.top: userNameText.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
// VU Meter
|
// VU Meter
|
||||||
Rectangle { // CHANGEME to the appropriate type!
|
Rectangle {
|
||||||
id: nameCardVUMeter
|
id: nameCardVUMeter
|
||||||
// Size
|
// Size
|
||||||
width: parent.width
|
width: ((gainSlider.value - gainSlider.minimumValue)/(gainSlider.maximumValue - gainSlider.minimumValue)) * parent.width
|
||||||
height: 8
|
height: 8
|
||||||
|
// Anchors
|
||||||
|
anchors.top: spacer.bottom
|
||||||
// Style
|
// Style
|
||||||
radius: 4
|
radius: 4
|
||||||
|
color: "#c5c5c5"
|
||||||
|
// Rectangle for the zero-gain point on the VU meter
|
||||||
|
Rectangle {
|
||||||
|
id: vuMeterZeroGain
|
||||||
|
visible: gainSlider.visible
|
||||||
|
// Size
|
||||||
|
width: 4
|
||||||
|
height: 18
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.darkGray
|
||||||
|
// Anchors
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: (-gainSlider.minimumValue)/(gainSlider.maximumValue - gainSlider.minimumValue) * gainSlider.width - 4
|
||||||
|
}
|
||||||
|
// Rectangle for the VU meter line
|
||||||
|
Rectangle {
|
||||||
|
id: vuMeterLine
|
||||||
|
width: gainSlider.width
|
||||||
|
visible: gainSlider.visible
|
||||||
|
// Style
|
||||||
|
color: vuMeterBase.color
|
||||||
|
radius: nameCardVUMeter.radius
|
||||||
|
height: nameCardVUMeter.height / 2
|
||||||
|
anchors.verticalCenter: nameCardVUMeter.verticalCenter
|
||||||
|
}
|
||||||
// Rectangle for the VU meter base
|
// Rectangle for the VU meter base
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: vuMeterBase
|
id: vuMeterBase
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
// Style
|
// Style
|
||||||
color: "#c5c5c5"
|
color: parent.color
|
||||||
radius: parent.radius
|
radius: parent.radius
|
||||||
}
|
}
|
||||||
// Rectangle for the VU meter audio level
|
// Rectangle for the VU meter audio level
|
||||||
|
@ -118,7 +152,7 @@ Row {
|
||||||
// Size
|
// Size
|
||||||
width: (thisNameCard.audioLevel) * parent.width
|
width: (thisNameCard.audioLevel) * parent.width
|
||||||
// Style
|
// Style
|
||||||
color: "#c5c5c5"
|
color: parent.color
|
||||||
radius: parent.radius
|
radius: parent.radius
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
@ -140,22 +174,20 @@ Row {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Per-Avatar Gain Slider Spacer
|
|
||||||
Item {
|
|
||||||
width: parent.width
|
|
||||||
height: 3
|
|
||||||
visible: !isMyCard && selected
|
|
||||||
}
|
|
||||||
// Per-Avatar Gain Slider
|
// Per-Avatar Gain Slider
|
||||||
Slider {
|
Slider {
|
||||||
id: gainSlider
|
id: gainSlider
|
||||||
visible: !isMyCard && selected
|
// Size
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 18
|
height: 14
|
||||||
|
// Anchors
|
||||||
|
anchors.verticalCenter: nameCardVUMeter.verticalCenter
|
||||||
|
// Properties
|
||||||
|
visible: !isMyCard && selected
|
||||||
value: pal.gainSliderValueDB[uuid] ? pal.gainSliderValueDB[uuid] : 0.0
|
value: pal.gainSliderValueDB[uuid] ? pal.gainSliderValueDB[uuid] : 0.0
|
||||||
minimumValue: -60.0
|
minimumValue: -60.0
|
||||||
maximumValue: 20.0
|
maximumValue: 20.0
|
||||||
stepSize: 2
|
stepSize: 5
|
||||||
updateValueWhileDragging: true
|
updateValueWhileDragging: true
|
||||||
onValueChanged: updateGainFromQML(uuid, value)
|
onValueChanged: updateGainFromQML(uuid, value)
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -177,16 +209,17 @@ Row {
|
||||||
}
|
}
|
||||||
style: SliderStyle {
|
style: SliderStyle {
|
||||||
groove: Rectangle {
|
groove: Rectangle {
|
||||||
color: "#dbdbdb"
|
color: "#c5c5c5"
|
||||||
implicitWidth: gainSlider.width
|
implicitWidth: gainSlider.width
|
||||||
implicitHeight: 4
|
implicitHeight: 4
|
||||||
radius: 2
|
radius: 2
|
||||||
|
opacity: 0
|
||||||
}
|
}
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: (control.pressed || control.hovered) ? "#00b4ef" : "#8F8F8F"
|
color: (control.pressed || control.hovered) ? "#00b4ef" : "#8F8F8F"
|
||||||
implicitWidth: 10
|
implicitWidth: 10
|
||||||
implicitHeight: 18
|
implicitHeight: 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 + (styleData.selected ? 20 : 0)
|
height: rowHeight
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue