Commit f91e158a authored by Camilo Higuita's avatar Camilo Higuita

quick updates and further use of mauikit

parent 892753b5
......@@ -22,7 +22,6 @@
<file>widgets/MainPlaylist/MainPlaylist.qml</file>
<file>widgets/MainPlaylist/PlaylistMenu.qml</file>
<file>widgets/PlaylistsView/PlaylistsView.qml</file>
<file>widgets/PlaylistsView/PlaylistViewDelegate.qml</file>
<file>widgets/InfoView/InfoView.qml</file>
<file>widgets/InfoView/LyricsView.qml</file>
<file>widgets/PlaylistsView/PlaylistsViewModel.qml</file>
......
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import "../../view_models"
import org.kde.maui 1.0 as Maui
ItemDelegate
{
id: delegate
width: parent.width
height: rowHeight
clip: true
property string labelColor: ListView.isCurrentItem ? highlightedTextColor : textColor
Rectangle
{
anchors.fill: parent
color: index % 2 === 0 ? Qt.darker(backgroundColor) : "transparent"
opacity: 0.1
}
MouseArea
{
anchors.fill: parent
acceptedButtons: Qt.RightButton
// onClicked:
// {
// if(!root.isMobile && mouse.button === Qt.RightButton)
// rightClicked()
// }
}
RowLayout
{
anchors.fill: parent
Item
{
Layout.fillHeight: true
width: parent.height
Maui.ToolButton
{
id: playBtn
anchors.centerIn: parent
iconName: playlistIcon ? playlistIcon : ""
iconColor: labelColor
}
}
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
Label
{
id: trackTitle
height: parent.height
width: parent.width
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignLeft
text: playlist
font.bold: false
elide: Text.ElideRight
font.pointSize: fontSizes.default
color: labelColor
}
}
// Item
// {
// visible: !playlistIcon
// Layout.fillHeight: true
// width: parent.height
// Maui.ToolButton
// {
// id: syncBtn
// anchors.centerIn: parent
// iconName: "amarok_playlist_refresh" //"playlist-generator"
// iconColor: textColor
// onClicked: playSync(index)
// }
// }
}
}
......@@ -114,7 +114,7 @@ Kirigami.PageRow
coverArtVisible: true
trackRating: true
trackDuration: false
headBarVisible: true
headBarVisible: !holder.visible
headBarExitIcon: "go-previous"
headBarExit: !playlistViewRoot.wideMode
headBarTitle: playlistViewRoot.wideMode ? "" : playlistViewModel.model.get(playlistViewModel.currentIndex).playlist
......
......@@ -44,23 +44,24 @@ BabeList
{
id: playlistListModel
ListElement { playlist: qsTr("Most Played"); playlistIcon: "view-media-playcount"; /*query: Q.Query.mostPlayedTracks*/ }
ListElement { playlist: qsTr("Favorites"); playlistIcon: "view-media-favorite"}
ListElement { playlist: qsTr("Recent"); playlistIcon: "view-media-recent"}
ListElement { playlist: qsTr("Babes"); playlistIcon: "love"}
ListElement { playlist: qsTr("Online"); playlistIcon: "internet-services"}
ListElement { playlist: qsTr("Tags"); playlistIcon: "tag"}
ListElement { playlist: qsTr("Relationships"); playlistIcon: "view-media-similarartists"}
ListElement { playlist: qsTr("Popular"); playlistIcon: "view-media-chart"}
ListElement { playlist: qsTr("Genres"); playlistIcon: "view-media-genre"}
ListElement { playlist: qsTr("Most Played"); icon: "view-media-playcount"; /*query: Q.Query.mostPlayedTracks*/ }
ListElement { playlist: qsTr("Favorites"); icon: "view-media-favorite"}
ListElement { playlist: qsTr("Recent"); icon: "view-media-recent"}
ListElement { playlist: qsTr("Babes"); icon: "love"}
ListElement { playlist: qsTr("Online"); icon: "internet-services"}
ListElement { playlist: qsTr("Tags"); icon: "tag"}
ListElement { playlist: qsTr("Relationships"); icon: "view-media-similarartists"}
ListElement { playlist: qsTr("Popular"); icon: "view-media-chart"}
ListElement { playlist: qsTr("Genres"); icon: "view-media-genre"}
}
model: playlistListModel
delegate : PlaylistViewDelegate
delegate : Maui.ListDelegate
{
id: delegate
width: playlistListRoot.width
label: model.playlist
Connections
{
......
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