Commit f18d8559 authored by camilo higuita's avatar camilo higuita

tweaks on the views order

parent e240bced
......@@ -77,11 +77,11 @@ Maui.ApplicationWindow
/******************** HANDLERS ********************/
/*************************************************/
readonly property var viewsIndex: ({ tracks: 0,
cloud : 1,
albums: 2,
artists: 3,
playlists: 4,
folders: 5,
albums: 1,
artists: 2,
playlists: 3,
folders: 4,
cloud : 5,
youtube: 6,
search: 7})
......@@ -149,6 +149,12 @@ Maui.ApplicationWindow
icon.name: "folder"
},
Action
{
text: qsTr("Cloud")
icon.name: "folder-cloud"
},
Action
{
text: qsTr("YouTube")
......@@ -162,12 +168,6 @@ Maui.ApplicationWindow
text: qsTr("Tracks")
}
Action
{
text: qsTr("Cloud")
icon.name: "folder-cloud"
}
Action
{
text: qsTr("Albums")
......@@ -424,7 +424,7 @@ Maui.ApplicationWindow
footer: ColumnLayout
{
id: _footerLayout
visible: !mainlistEmpty
visible: !mainlistEmpty || isPlaying
height: visible ? Maui.Style.toolBarHeight * 1.2 : 0
width: parent.width
spacing: 0
......@@ -579,15 +579,6 @@ Maui.ApplicationWindow
}
}
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem || item
sourceComponent: CloudView
{
id: cloudView
}
}
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem || item
......@@ -739,6 +730,15 @@ Maui.ApplicationWindow
}
}
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem || item
sourceComponent: CloudView
{
id: cloudView
}
}
Loader
{
active: SwipeView.isCurrentItem || item
......
......@@ -85,7 +85,7 @@ FMH::MODEL PlaylistsModel::packPlaylist(const QString &playlist)
return FMH::MODEL
{
{FMH::MODEL_KEY::PLAYLIST, playlist},
{FMH::MODEL_KEY::TYPE, "public"},
{FMH::MODEL_KEY::TYPE, "personal"},
{FMH::MODEL_KEY::ADDDATE, QDateTime::currentDateTime().toString(Qt::DateFormat::TextDate)}
// {FMH::MODEL_KEY::ICON, "view-media-playlist"}
};
......
......@@ -16,8 +16,8 @@ FMH::MODEL_LIST TracksModel::items() const
void TracksModel::setQuery(const QString &query)
{
if(this->query == query)
return;
// if(this->query == query)
// return;
this->query = query;
emit this->queryChanged();
......
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
......@@ -32,5 +32,5 @@ Maui.Page
listView.footerPositioning: ListView.OverlayFooter
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
}
}
}
......@@ -21,7 +21,7 @@ Maui.ItemDelegate
property bool showEmblem: true
property bool keepEmblemOverlay: selectionMode
property bool isSelected : false
property string trackMood : model.color
property color trackMood : model.color
readonly property color bgColor : Kirigami.Theme.backgroundColor
readonly property int altHeight : Maui.Style.rowHeight * 1.4
......@@ -52,7 +52,7 @@ Maui.ItemDelegate
signal artworkCoverClicked()
signal artworkCoverDoubleClicked()
Kirigami.Theme.backgroundColor: trackMood.length > 0 ? Qt.tint(bgColor, Qt.rgba(Qt.lighter(trackMood, 1.3).r, Qt.lighter(trackMood, 1.3).g, Qt.lighter(trackMood, 1.3).b, 0.3)): bgColor
Kirigami.Theme.backgroundColor: model.color.length > 0 ? Qt.rgba(trackMood.r, trackMood.g, trackMood.b, 0.2): bgColor
function rate(stars)
{
......@@ -105,6 +105,7 @@ Maui.ItemDelegate
visible: showQuickActions && (Kirigami.Settings.isMobile ? true : control.hovered)
icon.name: "media-playlist-append"
onClicked: control.append()
opacity: control.hovered ? 0.8 : 0.6
}
}
......
......@@ -11,7 +11,7 @@ Item
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
visible: opacity > 0.3
visible: opacity > 0.3 && !mainlistEmpty
height: Maui.Style.iconSizes.large * 1.2
width: height
......@@ -83,18 +83,17 @@ Item
drag.maximumY: root.height
onClicked: _drawer.visible = true
Rectangle
{
id: diskBg
anchors.centerIn: parent
height: parent.height
width: height
// border.color: Qt.tint(Kirigami.Theme.textColor, Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.7))
color: "white"
radius: Math.min(width, height)
Image
{
id: miniArtwork
......@@ -158,26 +157,4 @@ Item
running: isPlaying
}
}
// Rectangle
// {
// anchors.centerIn: parent
// width: parent.width * 0.5
// height: width
// radius: height
// color: "transparent"
// ShaderEffectSource
// {
// anchors.fill: parent
// sourceItem: root
// sourceRect:Qt.rect((control.x),
// (control.y),
// parent.width,
// parent.height)
// hideSource: true
// }
// }
}
This diff is collapsed.
......@@ -15,10 +15,11 @@ Item
Maui.GridBrowser
{
id: browser
anchors.margins: Maui.Style.space.big
anchors.fill: parent
showEmblem: false
model: ListModel {}
itemWidth: itemSize * 1.2
itemHeight: itemSize * 1.2
onItemClicked:
{
var item = browser.model.get(index)
......@@ -29,7 +30,6 @@ Item
}
}
Maui.Holder
{
anchors.fill: parent
......
......@@ -37,7 +37,6 @@ Maui.ToolBar
source: currentArtwork
}
FastBlur
{
id: fastBlur
......@@ -74,7 +73,7 @@ Maui.ToolBar
interactive: true
currentIndex: currentTrackIndex
spacing: Maui.Style.space.medium
cacheBuffer: control.width * 1
// cacheBuffer: control.width * 1
onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Center)
highlightFollowsCurrentItem: true
......@@ -84,7 +83,7 @@ Maui.ToolBar
highlightRangeMode: ListView.StrictlyEnforceRange
keyNavigationEnabled: true
keyNavigationWraps : true
onMovementEnded:
onCurrentItemChanged:
{
var index = indexAt(contentX, contentY)
if(index !== currentTrackIndex)
......
......@@ -70,7 +70,13 @@ Maui.Page
rightContent: ToolButton
{
icon.name: "edit-clear"
onClicked: mainPlaylist.table.list.clear()
onClicked:
{
player.stop()
mainPlaylist.table.list.clear()
root.sync = false
root.syncPlaylist = ""
}
}
leftContent: ToolButton
......
......@@ -24,6 +24,7 @@ Maui.Page
signal rowClicked(var track)
signal quickPlayTrack(var track)
signal appendTrack(var track)
signal playAll()
signal syncAndPlay(string playlist)
signal appendAll()
......@@ -138,6 +139,7 @@ Maui.Page
target: filterList
onRowClicked: control.rowClicked(filterList.listModel.get(index))
onQuickPlayTrack: control.quickPlayTrack(filterList.listModel.get(filterList.currentIndex))
onAppendTrack: control.appendTrack(filterList.listModel.get(filterList.currentIndex))
onPlayAll:
{
......
......@@ -17,9 +17,43 @@ BabeList
{
id: control
signal playSync(int index)
topPadding: Maui.Style.contentMargins
holder.emoji: "qrc:/assets/dialog-information.svg"
holder.title : qsTr("No Playlists!")
holder.body: qsTr("Start creating new custom playlists")
Connections
{
target: holder
onActionTriggered: newPlaylistDialog.open()
}
Menu
{
id: _playlistMenu
MenuItem
{
text: qsTr("Play")
onTriggered: populate(Q.GET.playlistTracks_.arg(currentPlaylist), true)
}
MenuItem
{
text: qsTr("Rename")
}
MenuSeparator{}
MenuItem
{
text: qsTr("Delete")
Kirigami.Theme.textColor: Kirigami.Theme.negativeTextColor
onTriggered: removePlaylist()
}
}
Maui.BaseModel
{
......@@ -33,7 +67,7 @@ BabeList
section.property: "type"
section.delegate: Maui.LabelDelegate
{
label: "Public"
label: "Personal"
isSection: true
width: control.width
}
......@@ -55,6 +89,20 @@ BabeList
filterList.group = false
populate(Q.GET.playlistTracks_.arg(currentPlaylist), true);
}
onRighClicked:
{
control.currentIndex = index
currentPlaylist = playlistsList.get(index).playlist
_playlistMenu.popup()
}
onPressAndHold:
{
control.currentIndex = index
currentPlaylist = playlistsList.get(index).playlist
_playlistMenu.popup()
}
}
}
......
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