Commit d8ef2b0b authored by Camilo Higuita's avatar Camilo Higuita

placeholders and fixes

parent b3981a9f
......@@ -41,12 +41,7 @@ Kirigami.ApplicationWindow
progressBar.value = pos
}
onFinished:
{
mainPlaylistTable.currentIndex = mainPlaylistTable.currentIndex+1 || 0
var track = mainPlaylistTable.model.get(mainPlaylistTable.currentIndex);
Player.playTrack(track)
}
onFinished: Player.nextTrack()
}
header: BabeBar
......@@ -196,7 +191,6 @@ Kirigami.ApplicationWindow
id: mainPlaylistTable
width: parent.width
height: parent.height
clip: true
onRowClicked:
{
Player.playTrack(model.get(index))
......@@ -245,7 +239,13 @@ Kirigami.ApplicationWindow
}
}
ArtistsView {}
ArtistsView
{
onRowClicked:
{
appendTrack(track)
}
}
PlaylistsView {}
......
......@@ -22,5 +22,6 @@
<file>db/script.sql</file>
<file>widgets/SettingsView.qml</file>
<file>utils/Player.js</file>
<file>assets/face.png</file>
</qresource>
</RCC>
......@@ -66,7 +66,7 @@ Item
Label
{
width: parent.width
text: album || artist
text: typeof album === 'undefined' ? artist : album
visible: true
elide: Text.ElideRight
font.pointSize: 10
......@@ -88,8 +88,8 @@ Item
Label
{
width: parent.width
text: artist
visible: album && artist ? true : false
text: typeof album === 'undefined' ? "" : artist
visible: typeof album === 'undefined'? false : true
elide: Text.ElideRight
font.pointSize: 9
color: "white"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
ListView
{
......@@ -13,6 +14,8 @@ ListView
width: 320
height: 480
clip: true
highlight: highlight
highlightFollowsCurrentItem: false
......@@ -30,6 +33,59 @@ ListView
}
Rectangle
{
id:placeHolder
width: parent.width
height: parent.height
visible: list.count===0
ColumnLayout
{
width: parent.width
height: parent.height
Layout.fillHeight: true
Image
{
id: imageHolder
width: 48
height: 48
Layout.fillWidth: true
source: "qrc:/assets/face.png"
horizontalAlignment: Qt.AlignHCenter
fillMode: Image.PreserveAspectFit
}
HueSaturation
{
anchors.fill: imageHolder
source: imageHolder
saturation: -1
lightness: 0.3
}
Label
{
id: textHolder
width: parent.width
Layout.fillWidth: true
opacity: 0.3
anchors.top: imageHolder.bottom
text: qsTr("Nothing here...")
padding: 10
font.bold: true
horizontalAlignment: Qt.AlignHCenter
elide: Text.ElideRight
}
}
}
Component
{
id: highlight
......
......@@ -13,6 +13,8 @@ BabeGrid
albumSize: 150
borderRadius: 20
signal rowClicked(var track)
Drawer
{
id: drawer
......@@ -76,6 +78,12 @@ BabeGrid
id: drawerList
width: parent.width
height: parent.height - titleBar.height
onRowClicked:
{
artistsView.rowClicked(model.get(index))
}
}
}
......@@ -86,7 +94,9 @@ BabeGrid
{
artistTitle.text = artist
drawer.open()
console.log("haha: ", album, artist)
drawerList.clearTable()
var query = "select * from tracks where artist = \""+artist+"\""
var map = con.get(query)
......
......@@ -8,7 +8,7 @@ import "../utils"
ToolBar
{
property alias babeBar : babeBar
property string accentColor : "#fa5a77"
property string accentColor : "#E91E63"
property string textColor : "#ffffff"
property string backgroundColor : "#31363b"
property int size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment