X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FMixer.qml;h=73587a5715bcdcfb6849977f298e9c941bfb9f80;hb=f2d1e14b5ecef1f464e3d38860ab474ce22fb2f0;hp=18fae4079f92ee7d53fd07bc9656327f85265bfe;hpb=bc11d604c87c2a04406e0750106e17a5c32f2e27;p=apps%2Fmixer.git diff --git a/app/Mixer.qml b/app/Mixer.qml index 18fae40..73587a5 100644 --- a/app/Mixer.qml +++ b/app/Mixer.qml @@ -14,10 +14,6 @@ * limitations under the License. */ -// BUG: ValueChanged event is raised by sliders when you are moving the caret, should be raised only when you release it. -// TODO: Call mixer.setVolume(sliderName, Value) on value change -// TODO: Call mixer.getVolume(sliderName) on load - import QtQuick 2.6 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 @@ -32,6 +28,8 @@ ApplicationWindow { // ----- Setup id: root + width: container.width * container.scale + height: container.height * container.scale // ----- Childs Mixer { @@ -49,10 +47,11 @@ ApplicationWindow { } Component.onCompleted: { - root.volumeSlider = Qt.createComponent("VolumeSlider.qml"); - if (root.VolumeSlider.status !== Component.Ready) { - console.log("Failed to load the VolumeSlider.qml component: " + root.volumeSlider.errorString()); + var vs = Qt.createComponent("VolumeSlider.qml"); + if (vs.status !== Component.Ready) { + console.log("Failed to load the VolumeSlider.qml component: " + vs.errorString()); } + root.volumeSlider = vs mixer.open(bindingAddress); } @@ -96,19 +95,27 @@ ApplicationWindow { } } - Label { - id: title - font.pixelSize: 48 - text: "Mixer" - anchors.horizontalCenter: parent.horizontalCenter - } + Item { + id: container + anchors.centerIn: parent + width: 1080 + height: 1487 + scale: screenInfo.scale_factor() + + Label { + id: title + font.pixelSize: 48 + text: "Mixer" + anchors.horizontalCenter: parent.horizontalCenter + } - ColumnLayout { - id: sliders - anchors.margins: 80 - anchors.top: title.bottom - anchors.left: parent.left - anchors.right: parent.right + ColumnLayout { + id: sliders + anchors.margins: 80 + anchors.top: title.bottom + anchors.left: parent.left + anchors.right: parent.right + } } }