From fd51d25dec9d6a48d71d4532aa4ac1c74b7865bf Mon Sep 17 00:00:00 2001 From: Camilo Higuita Date: Fri, 19 Jul 2019 16:22:39 -0500 Subject: [PATCH] fixes for kirigami and android --- main.qml | 8 +++++--- vvave.cpp | 19 ++++--------------- vvave.h | 2 -- widgets/MainPlaylist/AlbumsRoll.qml | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/main.qml b/main.qml index 588d8cb..6702f9a 100644 --- a/main.qml +++ b/main.qml @@ -163,8 +163,9 @@ Maui.ApplicationWindow headBar.spacing: space.big headBar.middleContent : Kirigami.ActionToolBar { - display: isWide ? ToolButton.TextBesideIcon : ToolButton.TextUnderIcon -Layout.fillWidth: true +// display: isWide ? ToolButton.TextBesideIcon : ToolButton.TextUnderIcon + position: Controls.ToolBar.Header + Layout.fillWidth: false hiddenActions: [ Kirigami.Action @@ -654,12 +655,13 @@ Layout.fillWidth: true contentItem: MainPlaylist { id: mainPlaylist + z: 999 Connections { target: mainPlaylist onCoverPressed: Player.appendAll(tracks) onCoverDoubleClicked: Player.playAll(tracks) - } + } } } diff --git a/vvave.cpp b/vvave.cpp index 779856d..e455d1f 100644 --- a/vvave.cpp +++ b/vvave.cpp @@ -26,7 +26,6 @@ vvave::vvave(QObject *parent) : QObject(parent), - notify(new Notify(this)), db(CollectionDB::getInstance()) { for(const auto &path : {BAE::CachePath, BAE::YoutubeCachePath}) @@ -36,21 +35,11 @@ vvave::vvave(QObject *parent) : QObject(parent), dirPath.mkpath("."); } -#if (defined (Q_OS_LINUX) && !defined (Q_OS_ANDROID)) - if(!FMH::fileExists(BAE::NotifyDir+"/vvave.notifyrc")) - QFile::copy(":/assets/vvave.notifyrc", BAE::NotifyDir+"/vvave.notifyrc"); - - connect(this->notify, &Notify::babeSong, [this]() - { - // emit this->babeIt(); - }); +//#if (defined (Q_OS_LINUX) && !defined (Q_OS_ANDROID)) +// if(!FMH::fileExists(BAE::NotifyDir+"/vvave.notifyrc")) +// QFile::copy(":/assets/vvave.notifyrc", BAE::NotifyDir+"/vvave.notifyrc"); - connect(this->notify, &Notify::skipSong, [this]() - { - // emit this->skipTrack(); - }); - -#endif +//#endif } vvave::~vvave() {} diff --git a/vvave.h b/vvave.h index 5ff43ec..adfc128 100644 --- a/vvave.h +++ b/vvave.h @@ -5,13 +5,11 @@ #include "utils/bae.h" #include -class Notify; class CollectionDB; class vvave : public QObject { Q_OBJECT private: - Notify *notify; CollectionDB *db; void checkCollection(const QStringList &paths = BAE::defaultSources, std::function cb = nullptr); diff --git a/widgets/MainPlaylist/AlbumsRoll.qml b/widgets/MainPlaylist/AlbumsRoll.qml index a2449c2..b2182ad 100644 --- a/widgets/MainPlaylist/AlbumsRoll.qml +++ b/widgets/MainPlaylist/AlbumsRoll.qml @@ -32,6 +32,7 @@ ListView // onCurrentIndexChanged: Player.playAt(currentIndex) + delegate: GridLayout { height: albumsRollRoot.height @@ -103,6 +104,23 @@ ListView } + MouseArea + { + anchors.fill : parent + preventStealing: true + parent: applicationWindow().overlay.parent + + onPressed: + { + console.log("albumsroll clicked") + mouse.accepted = false + } + + onReleased: + { + mouse.accepted = true + } + } function positionAlbum(index) { -- 2.24.0