Commit 105501ee authored by Camilo Higuita's avatar Camilo Higuita

collect db data directly, ui fixes on settings view, scale ui on mobile devices with small screens

parent 53c0407e
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <QApplication> #include <QApplication>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QDirIterator> #include <QDirIterator>
#include <QtQml>
#if (defined (Q_OS_LINUX) && !defined (Q_OS_ANDROID)) #if (defined (Q_OS_LINUX) && !defined (Q_OS_ANDROID))
#include "kde/notify.h" #include "kde/notify.h"
#endif #endif
...@@ -19,6 +19,7 @@ using namespace BAE; ...@@ -19,6 +19,7 @@ using namespace BAE;
Babe::Babe(QObject *parent) : QObject(parent) Babe::Babe(QObject *parent) : QObject(parent)
{ {
qDebug()<<"CONSTRUCTING ABE INTERFACE";
this->con = new CollectionDB(this); this->con = new CollectionDB(this);
this->set = new settings(this); this->set = new settings(this);
...@@ -52,7 +53,7 @@ Babe::~Babe() ...@@ -52,7 +53,7 @@ Babe::~Babe()
QVariantList Babe::get(const QString &queryTxt) QVariantList Babe::get(const QString &queryTxt)
{ {
return Babe::transformData(this->con->getDBData(queryTxt)); return this->con->getDBDataQML(queryTxt);
} }
QVariantList Babe::getList(const QStringList &urls) QVariantList Babe::getList(const QStringList &urls)
...@@ -320,6 +321,11 @@ int Babe::cursorPos(QString &axis) ...@@ -320,6 +321,11 @@ int Babe::cursorPos(QString &axis)
else return 0; else return 0;
} }
QString Babe::homeDir()
{
return BAE::MusicPath;
}
QVariantList Babe::getDirs(const QString &pathUrl) QVariantList Babe::getDirs(const QString &pathUrl)
{ {
auto path = pathUrl; auto path = pathUrl;
...@@ -339,7 +345,6 @@ QVariantList Babe::getDirs(const QString &pathUrl) ...@@ -339,7 +345,6 @@ QVariantList Babe::getDirs(const QString &pathUrl)
QVariantMap map = { {"url", url }, {"name", name} }; QVariantMap map = { {"url", url }, {"name", name} };
paths << map; paths << map;
} }
} }
return paths; return paths;
...@@ -347,7 +352,31 @@ QVariantList Babe::getDirs(const QString &pathUrl) ...@@ -347,7 +352,31 @@ QVariantList Babe::getDirs(const QString &pathUrl)
QVariantMap Babe::getParentDir(const QString &path) QVariantMap Babe::getParentDir(const QString &path)
{ {
return {{"url",QFileInfo(path).dir().absolutePath()}, {"name", QFileInfo(path).dir().dirName()}}; auto dirUrl = QFileInfo(path).dir().absolutePath();
auto dir = QDir(dirUrl);
if(dir.exists() && dir.isReadable() && !dir.isRoot())
return {{"url", dirUrl}, {"name", QFileInfo(path).dir().dirName()}};
else
return {{"url", path}, {"name", QDir(path).dirName()}};
}
void Babe::registerTypes()
{
qmlRegisterUncreatableType<Babe>("Babe", 1, 0, "Babe", "ERROR ABE");
}
uint Babe::sizeHint(const uint &hint)
{
if(hint>=BAE::BIG_ALBUM_FACTOR)
return BAE::getWidgetSizeHint(BAE::AlbumSizeHint::BIG_ALBUM);
else if(hint>=BAE::MEDIUM_ALBUM_FACTOR)
return BAE::getWidgetSizeHint(BAE::AlbumSizeHint::MEDIUM_ALBUM);
else if(hint>=BAE::SMALL_ALBUM_FACTOR)
return BAE::getWidgetSizeHint(BAE::AlbumSizeHint::SMALL_ALBUM);
else return hint;
} }
QString Babe::loadCover(const QString &url) QString Babe::loadCover(const QString &url)
...@@ -364,10 +393,9 @@ QString Babe::loadCover(const QString &url) ...@@ -364,10 +393,9 @@ QString Babe::loadCover(const QString &url)
auto artistImg = this->artistArt(artist); auto artistImg = this->artistArt(artist);
auto albumImg = this->albumArt(album, artist); auto albumImg = this->albumArt(album, artist);
if(!albumImg.isEmpty()) if(!albumImg.isEmpty() && albumImg != BAE::SLANG[W::NONE])
return albumImg; return albumImg;
else if (!artistImg.isEmpty()) else if (!artistImg.isEmpty() && artistImg != BAE::SLANG[W::NONE])
return artistImg; return artistImg;
else else
return this->fetchCoverArt(track); return this->fetchCoverArt(track);
...@@ -375,8 +403,8 @@ QString Babe::loadCover(const QString &url) ...@@ -375,8 +403,8 @@ QString Babe::loadCover(const QString &url)
QVariantList Babe::searchFor(const QStringList &queries) QVariantList Babe::searchFor(const QStringList &queries)
{ {
BAE::DB_LIST mapList; QVariantList mapList;
bool hasKey=false; bool hasKey = false;
for(auto searchQuery : queries) for(auto searchQuery : queries)
{ {
...@@ -388,7 +416,7 @@ QVariantList Babe::searchFor(const QStringList &queries) ...@@ -388,7 +416,7 @@ QVariantList Babe::searchFor(const QStringList &queries)
searchQuery=searchQuery.replace(BAE::SearchTMap[BAE::SearchT::LIKE]+":","").trimmed(); searchQuery=searchQuery.replace(BAE::SearchTMap[BAE::SearchT::LIKE]+":","").trimmed();
searchQuery=searchQuery.trimmed(); searchQuery = searchQuery.trimmed();
if(!searchQuery.isEmpty()) if(!searchQuery.isEmpty())
{ {
mapList += this->con->getSearchedTracks(BAE::KEY::WIKI, searchQuery); mapList += this->con->getSearchedTracks(BAE::KEY::WIKI, searchQuery);
...@@ -401,7 +429,7 @@ QVariantList Babe::searchFor(const QStringList &queries) ...@@ -401,7 +429,7 @@ QVariantList Babe::searchFor(const QStringList &queries)
searchQuery=searchQuery.replace(BAE::SearchTMap[BAE::SearchT::SIMILAR]+":","").trimmed(); searchQuery=searchQuery.replace(BAE::SearchTMap[BAE::SearchT::SIMILAR]+":","").trimmed();
searchQuery=searchQuery.trimmed(); searchQuery=searchQuery.trimmed();
if(!searchQuery.isEmpty()) if(!searchQuery.isEmpty())
mapList += this->con->getSearchedTracks(BAE::KEY::TAG,searchQuery); mapList += this->con->getSearchedTracks(BAE::KEY::TAG, searchQuery);
}else }else
{ {
...@@ -415,7 +443,7 @@ QVariantList Babe::searchFor(const QStringList &queries) ...@@ -415,7 +443,7 @@ QVariantList Babe::searchFor(const QStringList &queries)
{ {
hasKey=true; hasKey=true;
key=k.key(); key=k.key();
searchQuery=searchQuery.replace(k.value()+":","").trimmed(); searchQuery = searchQuery.replace(k.value()+":","").trimmed();
} }
} }
...@@ -429,13 +457,13 @@ QVariantList Babe::searchFor(const QStringList &queries) ...@@ -429,13 +457,13 @@ QVariantList Babe::searchFor(const QStringList &queries)
else else
{ {
auto queryTxt = QString("SELECT * FROM tracks WHERE title LIKE \"%"+searchQuery+"%\" OR artist LIKE \"%"+searchQuery+"%\" OR album LIKE \"%"+searchQuery+"%\"OR genre LIKE \"%"+searchQuery+"%\"OR url LIKE \"%"+searchQuery+"%\" LIMIT 1000"); auto queryTxt = QString("SELECT * FROM tracks WHERE title LIKE \"%"+searchQuery+"%\" OR artist LIKE \"%"+searchQuery+"%\" OR album LIKE \"%"+searchQuery+"%\"OR genre LIKE \"%"+searchQuery+"%\"OR url LIKE \"%"+searchQuery+"%\" LIMIT 1000");
mapList += this->con->getDBData(queryTxt); mapList += this->con->getDBDataQML(queryTxt);
} }
} }
} }
} }
return this->transformData(mapList); return mapList;
} }
QString Babe::fetchCoverArt(DB &song) QString Babe::fetchCoverArt(DB &song)
......
...@@ -23,6 +23,14 @@ public: ...@@ -23,6 +23,14 @@ public:
explicit Babe(QObject *parent = nullptr); explicit Babe(QObject *parent = nullptr);
~Babe(); ~Babe();
enum class HINT : uint
{
BIG_ALBUM = 200,
MEDIUM_ALBUM = 120,
SMALL_ALBUM = 80
};
Q_ENUM(HINT)
/* DATABASE INTERFACES */ /* DATABASE INTERFACES */
Q_INVOKABLE QVariantList get(const QString &queryTxt); Q_INVOKABLE QVariantList get(const QString &queryTxt);
...@@ -64,11 +72,12 @@ public: ...@@ -64,11 +72,12 @@ public:
Q_INVOKABLE static int screenGeometry(QString &side); Q_INVOKABLE static int screenGeometry(QString &side);
Q_INVOKABLE static int cursorPos(QString &axis); Q_INVOKABLE static int cursorPos(QString &axis);
Q_INVOKABLE static QString homeDir();
Q_INVOKABLE static QVariantList getDirs(const QString &pathUrl); Q_INVOKABLE static QVariantList getDirs(const QString &pathUrl);
Q_INVOKABLE static QVariantMap getParentDir(const QString &path); Q_INVOKABLE static QVariantMap getParentDir(const QString &path);
static void registerTypes();
Q_INVOKABLE static uint sizeHint(const uint &hint);
/*USEFUL*/ /*USEFUL*/
Q_INVOKABLE QString loadCover(const QString &url); Q_INVOKABLE QString loadCover(const QString &url);
......
...@@ -550,6 +550,29 @@ DB_LIST CollectionDB::getDBData(const QString &queryTxt) ...@@ -550,6 +550,29 @@ DB_LIST CollectionDB::getDBData(const QString &queryTxt)
return mapList; return mapList;
} }
QVariantList CollectionDB::getDBDataQML(const QString &queryTxt)
{
QVariantList mapList;
auto query = this->getQuery(queryTxt);
if(query.exec())
{
while(query.next())
{
QVariantMap data;
for(auto key : KEYMAP.keys())
if(query.record().indexOf(KEYMAP[key])>-1)
data[BAE::KEYMAP[key]] = query.value(KEYMAP[key]).toString();
mapList<< data;
}
}else qDebug()<< query.lastError()<< query.lastQuery();
return mapList;
}
DB_LIST CollectionDB::getAlbumTracks(const QString &album, const QString &artist, const KEY &orderBy, const BAE::W &order) DB_LIST CollectionDB::getAlbumTracks(const QString &album, const QString &artist, const KEY &orderBy, const BAE::W &order)
{ {
...@@ -589,7 +612,7 @@ DB_LIST CollectionDB::getBabedTracks(const KEY &orderBy, const BAE::W &order) ...@@ -589,7 +612,7 @@ DB_LIST CollectionDB::getBabedTracks(const KEY &orderBy, const BAE::W &order)
return this->getDBData(queryTxt); return this->getDBData(queryTxt);
} }
DB_LIST CollectionDB::getSearchedTracks(const KEY &where, const QString &search) QVariantList CollectionDB::getSearchedTracks(const KEY &where, const QString &search)
{ {
QString queryTxt; QString queryTxt;
...@@ -640,7 +663,7 @@ DB_LIST CollectionDB::getSearchedTracks(const KEY &where, const QString &search) ...@@ -640,7 +663,7 @@ DB_LIST CollectionDB::getSearchedTracks(const KEY &where, const QString &search)
qDebug()<<"SEARCH QUERY:"<<queryTxt; qDebug()<<"SEARCH QUERY:"<<queryTxt;
return this->getDBData(queryTxt); return this->getDBDataQML(queryTxt);
} }
......
...@@ -68,11 +68,12 @@ public: ...@@ -68,11 +68,12 @@ public:
BAE::DB_LIST getDBData(const QStringList &urls); BAE::DB_LIST getDBData(const QStringList &urls);
BAE::DB_LIST getDBData(const QString &queryTxt); BAE::DB_LIST getDBData(const QString &queryTxt);
QVariantList getDBDataQML(const QString &queryTxt);
BAE::DB_LIST getAlbumTracks(const QString &album, const QString &artist, const BAE::KEY &orderBy = BAE::KEY::TRACK, const BAE::W &order = BAE::W::ASC); BAE::DB_LIST getAlbumTracks(const QString &album, const QString &artist, const BAE::KEY &orderBy = BAE::KEY::TRACK, const BAE::W &order = BAE::W::ASC);
BAE::DB_LIST getArtistTracks(const QString &artist, const BAE::KEY &orderBy = BAE::KEY::ALBUM, const BAE::W &order = BAE::W::ASC); BAE::DB_LIST getArtistTracks(const QString &artist, const BAE::KEY &orderBy = BAE::KEY::ALBUM, const BAE::W &order = BAE::W::ASC);
BAE::DB_LIST getBabedTracks(const BAE::KEY &orderBy = BAE::KEY::PLAYED, const BAE::W &order = BAE::W::DESC); BAE::DB_LIST getBabedTracks(const BAE::KEY &orderBy = BAE::KEY::PLAYED, const BAE::W &order = BAE::W::DESC);
BAE::DB_LIST getSearchedTracks(const BAE::KEY &where, const QString &search); QVariantList getSearchedTracks(const BAE::KEY &where, const QString &search);
BAE::DB_LIST getPlaylistTracks(const QString &playlist, const BAE::KEY &orderBy = BAE::KEY::ADD_DATE, const BAE::W &order = BAE::W::DESC); BAE::DB_LIST getPlaylistTracks(const QString &playlist, const BAE::KEY &orderBy = BAE::KEY::ADD_DATE, const BAE::W &order = BAE::W::DESC);
BAE::DB_LIST getMostPlayedTracks(const int &greaterThan = 1,const int &limit = 50, const BAE::KEY &orderBy = BAE::KEY::PLAYED, const BAE::W &order = BAE::W::DESC); BAE::DB_LIST getMostPlayedTracks(const int &greaterThan = 1,const int &limit = 50, const BAE::KEY &orderBy = BAE::KEY::PLAYED, const BAE::W &order = BAE::W::DESC);
BAE::DB_LIST getFavTracks(const int &stars = 1,const int &limit = 50, const BAE::KEY &orderBy = BAE::KEY::STARS, const BAE::W &order = BAE::W::DESC); BAE::DB_LIST getFavTracks(const int &stars = 1,const int &limit = 50, const BAE::KEY &orderBy = BAE::KEY::STARS, const BAE::W &order = BAE::W::DESC);
......
...@@ -42,9 +42,14 @@ id INTEGER PRIMARY KEY , ...@@ -42,9 +42,14 @@ id INTEGER PRIMARY KEY ,
name TEXT NOT NULL name TEXT NOT NULL
) ; ) ;
CREATE TABLE FOLDERS
(
url TEXT PRIMARY KEY
) ;
CREATE TABLE SOURCES CREATE TABLE SOURCES
( (
url TEXT PRIMARY KEY , url TEXT PRIMARY KEY ,
SOURCE_TYPES_id INTEGER NOT NULL, SOURCE_TYPES_id INTEGER NOT NULL,
FOREIGN KEY(SOURCE_TYPES_id) REFERENCES SOURCES_TYPES(id) FOREIGN KEY(SOURCE_TYPES_id) REFERENCES SOURCES_TYPES(id)
) ; ) ;
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
#include "babe.h" #include "babe.h"
#include "services/local/player.h" #include "services/local/player.h"
#include <QLibrary> #include <QLibrary>
//#ifdef Q_OS_ANDROID //#ifdef Q_OS_ANDROID
//#include "./3rdparty/kirigami/src/kirigamiplugin.h" //#include "./3rdparty/kirigami/src/kirigamiplugin.h"
//#endif //#endif
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv); QApplication app(argc, argv);
...@@ -24,9 +25,9 @@ int main(int argc, char *argv[]) ...@@ -24,9 +25,9 @@ int main(int argc, char *argv[])
Babe bae; Babe bae;
Player player; Player player;
// bae.registerTypes();
context->setContextProperty("bae", &bae); context->setContextProperty("bae", &bae);
context->setContextProperty("player", &player); context->setContextProperty("player", &player);
//#ifdef Q_OS_ANDROID //#ifdef Q_OS_ANDROID
......
...@@ -25,7 +25,7 @@ ApplicationWindow ...@@ -25,7 +25,7 @@ ApplicationWindow
// property int columnWidth: Kirigami.Units.gridUnit * 13 // property int columnWidth: Kirigami.Units.gridUnit * 13
property int columnWidth: 250 property int columnWidth: Math.sqrt(root.width*root.height)*0.4
property int currentView : 0 property int currentView : 0
property int iconSize property int iconSize
property alias mainPlaylist : mainPlaylist property alias mainPlaylist : mainPlaylist
...@@ -103,7 +103,21 @@ ApplicationWindow ...@@ -103,7 +103,21 @@ ApplicationWindow
onAlbumsViewClicked: currentView = 2 onAlbumsViewClicked: currentView = 2
onArtistsViewClicked: currentView = 3 onArtistsViewClicked: currentView = 3
onPlaylistsViewClicked: currentView = 4 onPlaylistsViewClicked: currentView = 4
onSettingsViewClicked: currentView = 5 onSettingsViewClicked:
{
if(settingsDrawer.visible )
{
settingsDrawer.close()
settingsIcon.color = textColor
}
else
{
settingsDrawer.open()
settingsIcon.color = accentColor
}
}
} }
footer: Rectangle footer: Rectangle
...@@ -165,6 +179,15 @@ ApplicationWindow ...@@ -165,6 +179,15 @@ ApplicationWindow
z: -999 z: -999
} }
SettingsView
{
id: settingsDrawer
onIconSizeChanged: iconSize = size
}
Page Page
{ {
id: views id: views
...@@ -172,6 +195,10 @@ ApplicationWindow ...@@ -172,6 +195,10 @@ ApplicationWindow
height: parent.height height: parent.height
clip: true clip: true
transform: Translate {
x: (settingsDrawer.position * views.width * 0.33)*-1
}
Column Column
{ {
width: parent.width width: parent.width
...@@ -243,10 +270,6 @@ ApplicationWindow ...@@ -243,10 +270,6 @@ ApplicationWindow
PlaylistsView {} PlaylistsView {}
SettingsView
{
onIconSizeChanged: iconSize = size
}
SearchTable SearchTable
{ {
......
...@@ -99,13 +99,13 @@ settings::settings(QObject *parent) : QObject(parent) ...@@ -99,13 +99,13 @@ settings::settings(QObject *parent) : QObject(parent)
{BAE::TABLEMAP[TABLE::PLAYLISTS], true}}); {BAE::TABLEMAP[TABLE::PLAYLISTS], true}});
this->startBrainz(500); this->startBrainz(1000);
}else }else
{ {
this->dirs.clear(); this->dirs.clear();
this->collectionWatcher(); this->collectionWatcher();
this->watcher->removePaths(watcher->directories()); this->watcher->removePaths(watcher->directories());
this->startBrainz(1500); this->startBrainz(2000);
} }
...@@ -209,7 +209,7 @@ void settings::checkCollection() ...@@ -209,7 +209,7 @@ void settings::checkCollection()
// this->refreshCollectionPaths(); // this->refreshCollectionPaths();
// this->collectionWatcher(); // this->collectionWatcher();
this->brainzOn = true; this->brainzOn = true;
this->startBrainz(1500); this->startBrainz(2000);
} }
void settings::startBrainz(const int &speed) void settings::startBrainz(const int &speed)
...@@ -219,7 +219,6 @@ void settings::startBrainz(const int &speed) ...@@ -219,7 +219,6 @@ void settings::startBrainz(const int &speed)
this->brainDeamon->setInterval(speed); this->brainDeamon->setInterval(speed);
this->brainDeamon->start(); this->brainDeamon->start();
} }
} }
void settings::populateDB(const QStringList &paths) void settings::populateDB(const QStringList &paths)
......
...@@ -7,7 +7,10 @@ function playTrack(track) ...@@ -7,7 +7,10 @@ function playTrack(track)
player.source(root.mainPlaylist.currentTrack.url); player.source(root.mainPlaylist.currentTrack.url);
player.play() player.play()
root.title = root.mainPlaylist.currentTrack.title + " - " +root.mainPlaylist.currentTrack.artist root.title = root.mainPlaylist.currentTrack.title + " - " +root.mainPlaylist.currentTrack.artist
root.mainPlaylist.currentArtwork = root.mainPlaylist.currentTrack.artwork || bae.loadCover(root.mainPlaylist.currentTrack.url)
var artwork = root.mainPlaylist.currentTrack.artwork
root.mainPlaylist.currentArtwork = artwork ? artwork : bae.loadCover(root.mainPlaylist.currentTrack.url)
if(!root.active) if(!root.active)
bae.notifySong(root.mainPlaylist.currentTrack.url) bae.notifySong(root.mainPlaylist.currentTrack.url)
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
#include <QTime> #include <QTime>
#include <QSettings> #include <QSettings>
#include <QDirIterator> #include <QDirIterator>
#include <QApplication>
#include <QScreen>
#include <cmath> #include <cmath>
using namespace std; using namespace std;
...@@ -178,14 +179,7 @@ namespace BAE ...@@ -178,14 +179,7 @@ namespace BAE
{KEY::ART, KEYMAP[KEY::ART]} {KEY::ART, KEYMAP[KEY::ART]}
}; };
enum class AlbumSizeHint : uint inline QString transformTime(const qint64 &value)
{
BIG_ALBUM = 200,
MEDIUM_ALBUM = 120,
SMALL_ALBUM = 80
};
inline QString transformTime(const qint64 &value)
{ {
QString tStr; QString tStr;
if (value) if (value)
...@@ -413,6 +407,46 @@ namespace BAE ...@@ -413,6 +407,46 @@ namespace BAE
return false; return false;
#endif #endif
} }
enum class AlbumSizeHint : uint
{
BIG_ALBUM = 200,
MEDIUM_ALBUM = 120,
SMALL_ALBUM = 80
};
static const uint MAX_BIG_ALBUM_SIZE = 300;
static const uint MAX_MID_ALBUM_SIZE = 200;
static const uint MAX_MIN_ALBUM_SIZE = 100;
typedef double ALBUM_FACTOR;
static const ALBUM_FACTOR BIG_ALBUM_FACTOR = 0.039;
static const ALBUM_FACTOR BIG_ALBUM_FACTOR_SUBWIDGET = 0.27;
static const ALBUM_FACTOR MEDIUM_ALBUM_FACTOR = 0.013;
static const ALBUM_FACTOR MEDIUM_ALBUM_FACTOR_SUBWIDGET = 0.4;
static const ALBUM_FACTOR SMALL_ALBUM_FACTOR = 0.006;
static const ALBUM_FACTOR SMALL_ALBUM_FACTOR_SUBWIDGET = 0.5;
inline uint getWidgetSizeHint(const AlbumSizeHint &deafultValue)
{
QScreen *screenSize = QApplication::screens().at(0);
auto screen = static_cast<uint>(sqrt((screenSize->availableSize().height()*screenSize->availableSize().width())));
switch(deafultValue)
{
case AlbumSizeHint::BIG_ALBUM:
return screen * 0.3 ;
case AlbumSizeHint::MEDIUM_ALBUM:
return screen * 0.1 ;
case AlbumSizeHint::SMALL_ALBUM:
return screen * 0.05 ;
}
}
} }
......
...@@ -3,6 +3,9 @@ import QtQuick 2.9 ...@@ -3,6 +3,9 @@ import QtQuick 2.9
Pane Pane
{ {
id: gridPage
property int albumSize : 150 property int albumSize : 150
property int albumSpacing: 20 property int albumSpacing: 20
property int borderRadius : 4 property int borderRadius : 4
...@@ -13,7 +16,7 @@ Pane ...@@ -13,7 +16,7 @@ Pane
width: 500 width: 500
height: 400 height: 400
id: gridPage
background: Rectangle background: Rectangle
{ {
...@@ -86,6 +89,7 @@ Pane ...@@ -86,6 +89,7 @@ Pane
{ {
id: delegate id: delegate
albumSize : gridPage.albumSize
Connections Connections
{ {
target: delegate target: delegate
......
...@@ -7,13 +7,10 @@ Rectangle ...@@ -7,13 +7,10 @@ Rectangle
{ {
property string emoji property string emoji
property string message property string message
clip: true clip: true
anchors.fill: parent anchors.fill: parent
color: bae.backgroundColor() color: "transparent"
GridLayout GridLayout
{ {
......
...@@ -101,8 +101,8 @@ ListView ...@@ -101,8 +101,8 @@ ListView
onClicked: onClicked:
{ {
list.rowClicked(index)
currentIndex = index currentIndex = index
list.rowClicked(index)
} }
onPlay: list.quickPlayTrack(index) onPlay: list.quickPlayTrack(index)
......
...@@ -11,7 +11,7 @@ BabeGrid ...@@ -11,7 +11,7 @@ BabeGrid
{ {
id: albumsViewGrid id: albumsViewGrid
visible: true visible: true
albumSize: 150 albumSize:Math.sqrt(root.width*root.height)*0.25
borderRadius: 20 borderRadius: 20
signal rowClicked(var track) signal rowClicked(var track)
......
...@@ -11,7 +11,7 @@ BabeGrid ...@@ -11,7 +11,7 @@ BabeGrid
{ {
id:artistsViewGrid id:artistsViewGrid
visible: true visible: true
albumSize: 150 albumSize:Math.sqrt(root.width*root.height)*0.25
borderRadius: 20 borderRadius: 20
signal rowClicked(var track) signal rowClicked(var track)
......
...@@ -8,6 +8,7 @@ import "../utils" ...@@ -8,6 +8,7 @@ import "../utils"