mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 14:04:23 +02:00
movable audio bar
This commit is contained in:
parent
3a7ec33d38
commit
35e17b7604
1 changed files with 21 additions and 23 deletions
|
@ -10,21 +10,32 @@ import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import QtQuick.Controls 1.3
|
import QtQuick.Controls 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
Hifi.AvatarInputs {
|
Hifi.AvatarInputs {
|
||||||
id: root
|
id: root
|
||||||
objectName: "AvatarInputs"
|
objectName: "AvatarInputs"
|
||||||
anchors.fill: parent
|
width: mirrorWidth
|
||||||
|
height: controls.height + mirror.height
|
||||||
|
x: 10; y: 5
|
||||||
|
|
||||||
// width: 800
|
|
||||||
// height: 600
|
|
||||||
// color: "black"
|
|
||||||
readonly property int iconPadding: 5
|
|
||||||
readonly property int mirrorHeight: 215
|
readonly property int mirrorHeight: 215
|
||||||
readonly property int mirrorWidth: 265
|
readonly property int mirrorWidth: 265
|
||||||
readonly property int mirrorTopPad: iconPadding
|
|
||||||
readonly property int mirrorLeftPad: 10
|
|
||||||
readonly property int iconSize: 24
|
readonly property int iconSize: 24
|
||||||
|
readonly property int iconPadding: 5
|
||||||
|
|
||||||
|
Settings {
|
||||||
|
category: "Overlay.AvatarInputs"
|
||||||
|
property alias x: root.x
|
||||||
|
property alias y: root.y
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: hover
|
||||||
|
hoverEnabled: true
|
||||||
|
drag.target: parent
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mirror
|
id: mirror
|
||||||
|
@ -32,18 +43,8 @@ Hifi.AvatarInputs {
|
||||||
height: root.mirrorVisible ? root.mirrorHeight : 0
|
height: root.mirrorVisible ? root.mirrorHeight : 0
|
||||||
visible: root.mirrorVisible
|
visible: root.mirrorVisible
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: root.mirrorLeftPad
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: root.mirrorTopPad
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: hover
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
propagateComposedEvents: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: closeMirror
|
id: closeMirror
|
||||||
visible: hover.containsMouse
|
visible: hover.containsMouse
|
||||||
|
@ -64,7 +65,7 @@ Hifi.AvatarInputs {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: zoomIn
|
id: zoomIn
|
||||||
visible: hover.containsMouse
|
visible: hover.containsMouse
|
||||||
width: root.iconSize
|
width: root.iconSize
|
||||||
height: root.iconSize
|
height: root.iconSize
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
@ -82,14 +83,11 @@ Hifi.AvatarInputs {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: controls
|
||||||
width: root.mirrorWidth
|
width: root.mirrorWidth
|
||||||
height: 44
|
height: 44
|
||||||
visible: !root.isHMD
|
visible: !root.isHMD
|
||||||
|
anchors.top: mirror.bottom
|
||||||
x: root.mirrorLeftPad
|
|
||||||
y: root.mirrorVisible ? root.mirrorTopPad + root.mirrorHeight : 5
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
Loading…
Reference in a new issue