From 35e17b76042ce9f850702b4c93def50f12f15cd9 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 7 Jan 2016 15:43:51 -0800 Subject: [PATCH] movable audio bar --- interface/resources/qml/AvatarInputs.qml | 44 +++++++++++------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/interface/resources/qml/AvatarInputs.qml b/interface/resources/qml/AvatarInputs.qml index 49aeee3074..ce729d468d 100644 --- a/interface/resources/qml/AvatarInputs.qml +++ b/interface/resources/qml/AvatarInputs.qml @@ -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