mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 16:23:16 +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.Controls 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
Hifi.AvatarInputs {
|
||||
id: root
|
||||
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 mirrorWidth: 265
|
||||
readonly property int mirrorTopPad: iconPadding
|
||||
readonly property int mirrorLeftPad: 10
|
||||
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 {
|
||||
id: mirror
|
||||
|
@ -32,18 +43,8 @@ Hifi.AvatarInputs {
|
|||
height: root.mirrorVisible ? root.mirrorHeight : 0
|
||||
visible: root.mirrorVisible
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: root.mirrorLeftPad
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: root.mirrorTopPad
|
||||
clip: true
|
||||
|
||||
MouseArea {
|
||||
id: hover
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: true
|
||||
}
|
||||
|
||||
Image {
|
||||
id: closeMirror
|
||||
visible: hover.containsMouse
|
||||
|
@ -64,7 +65,7 @@ Hifi.AvatarInputs {
|
|||
|
||||
Image {
|
||||
id: zoomIn
|
||||
visible: hover.containsMouse
|
||||
visible: hover.containsMouse
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
anchors.bottom: parent.bottom
|
||||
|
@ -82,14 +83,11 @@ Hifi.AvatarInputs {
|
|||
}
|
||||
|
||||
Item {
|
||||
id: controls
|
||||
width: root.mirrorWidth
|
||||
height: 44
|
||||
visible: !root.isHMD
|
||||
|
||||
x: root.mirrorLeftPad
|
||||
y: root.mirrorVisible ? root.mirrorTopPad + root.mirrorHeight : 5
|
||||
|
||||
|
||||
anchors.top: mirror.bottom
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
|
Loading…
Reference in a new issue