From e610774e49989b99c899c9e2e11237405fc74a28 Mon Sep 17 00:00:00 2001 From: Anika Raemer Date: Tue, 4 Dec 2018 08:36:41 +0100 Subject: [PATCH] modifications to ui of player. --- LenaPi/MusicPlayer.qml | 31 ++++++++++++++++++++++++------- LenaPi/models/MusicModel.cpp | 1 - 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/LenaPi/MusicPlayer.qml b/LenaPi/MusicPlayer.qml index c6c5ddb..d254b17 100644 --- a/LenaPi/MusicPlayer.qml +++ b/LenaPi/MusicPlayer.qml @@ -1,21 +1,38 @@ import QtQuick 2.0 +import QtGraphicalEffects 1.0 Item{ id: container - Image { - id: backgroundImage + property int margins: 20 - anchors.fill: parent - source: musicModel.pCurrentItem.pImageSource - fillMode: Image.PreserveAspectCrop - verticalAlignment: Image.AlignTop + Rectangle{ + id: coverBorder + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: container.margins + height: parent.height-controlPannel.height-2*container.margins + width: height + color: "blue" + Image{ + id: cover + anchors.centerIn: parent + height: parent.height-10 + width: height + source: musicModel.pCurrentItem.pImageSource + fillMode: Image.PreserveAspectCrop + layer.enabled: true + layer.effect: OpacityMask{ + maskSource: coverBorder + } + } } + RoundButton{ id: backNavigation anchors.left: parent.left anchors.top: parent.top - anchors.margins: 20 + anchors.margins: container.margins onClicked: { musicModel.navigateBack(); } diff --git a/LenaPi/models/MusicModel.cpp b/LenaPi/models/MusicModel.cpp index ee8ca35..0ecdae3 100644 --- a/LenaPi/models/MusicModel.cpp +++ b/LenaPi/models/MusicModel.cpp @@ -6,7 +6,6 @@ MusicModel::MusicModel(VlcInstance* instance, QObject *parent) : QObject(parent), mVlc(instance), mMedia(new VlcMediaList(instance)) { - } MusicModel::~MusicModel()