Commit ae76fa23 authored by camilo higuita's avatar camilo higuita

added time labels on main view and initial work on a desktop-focus view as minimode

parent 0ef86e3d
This diff is collapsed.
......@@ -123,8 +123,8 @@ void AlbumsModel::setList()
this->sortList();
emit this->postListChanged();
if(this->query == AlbumsModel::QUERY::ALBUMS)
this->fetchInformation();
//if(this->query == AlbumsModel::QUERY::ALBUMS)
//this->fetchInformation();
}
void AlbumsModel::fetchInformation()
......
......@@ -56,6 +56,7 @@
<file>widgets/CloudView/CloudView.qml</file>
<file>widgets/SelectionBar.qml</file>
<file>widgets/FocusView.qml</file>
<file>widgets/MiniMode.qml</file>
</qresource>
<qresource prefix="/DB">
<file>db/script.sql</file>
......
......@@ -21,7 +21,8 @@ Maui.Page
property bool wasPulled : false
signal pulled()
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
Maui.ListBrowser
{
......@@ -31,12 +32,5 @@ Maui.Page
topMargin: Maui.Style.space.medium
listView.headerPositioning: Kirigami.Settings.isMobile ? ListView.PullBackHeader : ListView.OverlayHeader
listView.footerPositioning: ListView.OverlayFooter
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
background: Rectangle
{
color: Kirigami.Theme.backgroundColor
}
}
}
......@@ -242,7 +242,7 @@ BabeList
onRejected:
{
if(Maui.FM.removeFile(list.get(index).url))
if(Maui.FM.removeFile(listModel.get(index).url))
list.remove(listView.currentIndex)
close()
}
......@@ -269,20 +269,20 @@ BabeList
onFavClicked:
{
list.fav(listView.currentIndex, !(list.get(listView.currentIndex).fav == "1"))
list.fav(listView.currentIndex, !(listModel.get(listView.currentIndex).fav == "1"))
}
onQueueClicked: Player.queueTracks([list.get(listView.currentIndex)])
onQueueClicked: Player.queueTracks([listModel.get(listView.currentIndex)])
onPlayClicked: quickPlayTrack(listView.currentIndex)
onAppendClicked: appendTrack(listView.currentIndex)
onSaveToClicked:
{
playlistDialog.tracks = [list.get(listView.currentIndex).url]
playlistDialog.tracks = [listModel.get(listView.currentIndex).url]
playlistDialog.open()
}
onOpenWithClicked: Maui.FM.openLocation([list.get(listView.currentIndex).url])
onOpenWithClicked: Maui.FM.openLocation([listModel.get(listView.currentIndex).url])
onDeleteClicked:
{
......@@ -302,7 +302,7 @@ BabeList
onInfoClicked:
{
infoView.show(list.get(listView.currentIndex))
infoView.show(listModel.get(listView.currentIndex))
}
onCopyToClicked:
......@@ -312,7 +312,7 @@ BabeList
onShareClicked:
{
const url = list.get(listView.currentIndex).url
const url = listModel.get(listView.currentIndex).url
if(isAndroid)
{
......@@ -368,16 +368,16 @@ BabeList
onPressAndHold: if(Kirigami.Settings.isMobile && allowMenu) openItemMenu(index)
onRightClicked: if(allowMenu) openItemMenu(index)
onLeftEmblemClicked: H.addToSelection(list.get(index))
onLeftEmblemClicked: H.addToSelection(listModel.get(index))
isSelected: selectionBar.contains(model.url)
sameAlbum:
{
if(coverArt)
{
if(list.get(index-1))
if(listModel.get(index-1))
{
if(list.get(index-1).album === album && list.get(index-1).artist === artist) true
if(listModel.get(index-1).album === album && listModel.get(index-1).artist === artist) true
else false
}else false
}else false
......@@ -398,7 +398,7 @@ BabeList
currentIndex = index
if(selectionMode)
{
H.addToSelection(list.get(listView.currentIndex))
H.addToSelection(listModel.get(listView.currentIndex))
return
}
......@@ -455,8 +455,8 @@ BabeList
function openItemMenu(index)
{
currentIndex = index
contextMenu.rate = list.get(currentIndex).rate
contextMenu.fav = list.get(currentIndex).fav == "1"
contextMenu.rate = listModel.get(currentIndex).rate
contextMenu.fav = listModel.get(currentIndex).fav == "1"
contextMenu.popup()
rowPressed(index)
......@@ -482,7 +482,7 @@ BabeList
if(list.count > 0)
{
for(var i = 0; i < list.count; ++i)
trackList.push(list.get(i))
trackList.push(listModel.get(i))
Player.queueTracks(trackList)
}
......@@ -491,7 +491,7 @@ BabeList
function goToAlbum()
{
swipeView.currentIndex = viewsIndex.albums
const item = list.get(listView.currentIndex)
const item = listModel.get(listView.currentIndex)
swipeView.currentItem.item.populateTable(item.album, item.artist)
contextMenu.close()
}
......@@ -499,7 +499,7 @@ BabeList
function goToArtist()
{
swipeView.currentIndex = viewsIndex.artists
const item = list.get(listView.currentIndex)
const item = listModel.get(listView.currentIndex)
swipeView.currentItem.item.populateTable(undefined, item.artist)
contextMenu.close()
}
......
......@@ -44,7 +44,7 @@ Menu
icon.name: "item-select"
onTriggered:
{
H.addToSelection(list.get(listView.currentIndex))
H.addToSelection(listModel.get(listView.currentIndex))
if(Kirigami.Settings.isMobile)
selectionMode = true
......
......@@ -13,10 +13,10 @@ Item
visible: opacity > 0.3 && !mainlistEmpty
height: Maui.Style.iconSizes.large * 1.2
height: Maui.Style.iconSizes.large * (_mouseArea.containsPress ? 1.19 : 1.2)
width: height
x: root.footBar.x + Maui.Style.space.medium
x: root.footBar.x + Maui.Style.space.medium + _drawer.width
y: parent.height - height - Maui.Style.space.medium
parent: ApplicationWindow.overlay
......@@ -77,13 +77,11 @@ Item
drag.target: parent
drag.axis: Drag.XAndYAxis
drag.minimumX: 0
drag.maximumX: root.width
drag.maximumX: root.width - control.width
drag.minimumY: 0
drag.maximumY: root.height
onClicked: _drawer.visible = true
drag.maximumY: root.height - control.height
onClicked: _drawer.visible = !_drawer.visible
Rectangle
{
......@@ -133,8 +131,6 @@ Item
}
}
}
}
DropShadow
......@@ -142,7 +138,7 @@ Item
anchors.fill: diskBg
horizontalOffset: 0
verticalOffset: 0
radius: 8.0
radius: _mouseArea.containsPress ? 5.0 :8.0
samples: 17
color: "#80000000"
source: diskBg
......
......@@ -13,7 +13,7 @@ Maui.Page
parent: ApplicationWindow.overlay
anchors.fill: parent
z: parent.z + 99999
title: qsTr("Now Playing")
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.View
......@@ -220,8 +220,6 @@ Maui.Page
}
}
Item
{
Layout.fillHeight: true
......@@ -229,6 +227,7 @@ Maui.Page
Rectangle
{
anchors.centerIn: parent
visible: (_listView.currentIndex < _listView.count - 1) && (_listView.count > 1)
height: Maui.Style.iconSizes.small
width : height
......@@ -237,15 +236,10 @@ Maui.Page
color: Kirigami.Theme.textColor
opacity: 0.4
anchors.centerIn: parent
}
}
}
RowLayout
{
Layout.fillWidth: true
......
......@@ -14,9 +14,6 @@ Maui.ToolBar
id: control
visible: !mainlistEmpty
padding: 0
height: Maui.Style.toolBarHeight * 1.2
background: Item
{
Image
......
......@@ -58,7 +58,7 @@ Maui.Page
holder.title : "Meh!"
holder.body: "Start putting together your playlist!"
holder.emojiSize: Maui.Style.iconSizes.huge
Kirigami.Theme.colorSet: Kirigami.Theme.Window
listView.header: Rectangle
{
visible: root.sync
......
import QtQuick 2.0
Item {
}
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