Commit 7b2f4c0d authored by Camilo Higuita's avatar Camilo Higuita

update BabeIcon template to late ron take default system icons and more work on default playlists

parent ad0ae63d
......@@ -5,7 +5,6 @@ import QtGraphicalEffects 1.0
//import org.kde.kirigami 2.0 as Kirigami
import "db/Queries.js" as Q
import "utils/Icons.js" as MdiFont
import "utils/Player.js" as Player
import "utils"
import "widgets"
......@@ -166,7 +165,7 @@ ApplicationWindow
anchors.centerIn: parent
visible: !(searchInput.focus || searchInput.text)
id: searchBtn
text: MdiFont.Icon.magnify
icon: "magnify"
color: bae.foregroundColor()
}
......@@ -177,7 +176,7 @@ ApplicationWindow
BabeIcon
{
visible: searchInput.text
text: MdiFont.Icon.eraser
icon: "eraser"
color: bae.foregroundColor()
}
......
......@@ -38,5 +38,7 @@
<file>view_models/BabeTable/BabeTable.qml</file>
<file>view_models/BabeTable/TableMenu.qml</file>
<file>view_models/BabeTable/TableMenuItem.qml</file>
<file>widgets/PlaylistViewDelegate.qml</file>
<file>view_models/ColorTagsBar.qml</file>
</qresource>
</RCC>
import QtQuick 2.3
import QtQuick 2.9
import "../utils/Icons.js" as MdiFont
Text
{
id: text
property string iconColor: bae.foregroundColor()
property int iconSize
readonly property string defaultColor : iconColor
property string icon
text: MdiFont.Icon[icon]
font.family: "Material Design Icons"
font.pixelSize: iconSize || 24
anchors.centerIn: parent
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../utils/Icons.js" as MdiFont
import "../../utils"
import ".."
......@@ -110,7 +109,7 @@ ListView
visible: headerClose
width: parent.height
height: parent.height
BabeIcon { text: MdiFont.Icon.close }
BabeIcon { icon: "close" }
onClicked: headerClosed()
}
......@@ -121,7 +120,7 @@ ListView
width: parent.height
height: parent.height
BabeIcon {text: MdiFont.Icon.playBoxOutline}
BabeIcon {icon: "playBoxOutline"}
onClicked: playAll()
}
......@@ -148,7 +147,7 @@ ListView
width: parent.height
height: parent.height
BabeIcon {text: MdiFont.Icon.playlistPlus}
BabeIcon {icon: "playlistPlus"}
onClicked: appendAll()
}
......@@ -160,7 +159,7 @@ ListView
width: parent.height
height: parent.height
BabeIcon {text: MdiFont.Icon.dotsVertical}
BabeIcon {icon: "dotsVertical"}
onClicked: {}
}
......@@ -177,7 +176,7 @@ ListView
model: listModel
delegate: TableDelegate
delegate: TableDelegate
{
id: delegate
width: list.width
......
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import "../../utils/Icons.js" as MdiFont
import "../../utils"
ItemDelegate
......@@ -41,11 +40,11 @@ ItemDelegate
property string trackMood : art
property alias trackRating : trackRating
NumberAnimation on x
{
running: ListView.isCurrentItem
from: 0; to: 100
}
// NumberAnimation on x
// {
// running: ListView.isCurrentItem
// from: 0; to: 100
// }
Rectangle
{
......@@ -124,7 +123,7 @@ ItemDelegate
id: playBtn
anchors.centerIn: parent
BabeIcon { text: MdiFont.Icon.playCircle; color: textColor }
BabeIcon { icon: "playCircle"; color: textColor }
onClicked: play()
}
}
......
......@@ -2,9 +2,9 @@ import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../utils/Icons.js" as MdiFont
import "../../utils/Help.js" as H
import "../../utils"
import ".."
Menu
{
......@@ -18,7 +18,7 @@ Menu
property int rate : 0
property string starColor : "#FFC107"
property string starReg : bae.foregroundColor()
property string starIcon: MdiFont.Icon.star
property string starIcon: "star"
property int assetsize : menuItemHeight/2
property int menuItemHeight : root.isMobile ? 48 : 32;
......@@ -138,7 +138,7 @@ Menu
Layout.alignment: Qt.AlignCenter
BabeIcon
{
text: starIcon
icon: starIcon
color: rate >= 1 ? starColor :starReg
iconSize: assetsize
}
......@@ -152,7 +152,7 @@ Menu
Layout.alignment: Qt.AlignCenter
BabeIcon
{
text: starIcon
icon: starIcon
color: rate >= 2 ? starColor :starReg
iconSize: assetsize
}
......@@ -166,7 +166,7 @@ Menu
Layout.alignment: Qt.AlignCenter
BabeIcon
{
text: starIcon
icon: starIcon
color: rate >= 3 ? starColor :starReg
iconSize: assetsize
}
......@@ -181,7 +181,7 @@ Menu
Layout.alignment: Qt.AlignCenter
BabeIcon
{
text: starIcon
icon: starIcon
color: rate >= 4 ? starColor :starReg
iconSize: assetsize
}
......@@ -196,7 +196,7 @@ Menu
Layout.alignment: Qt.AlignCenter
BabeIcon
{
text: starIcon
icon: starIcon
color: rate >= 5 ? starColor :starReg
iconSize: assetsize
}
......@@ -212,105 +212,11 @@ Menu
height: menuItemHeight
hoverEnabled: true
padding: 10
RowLayout
ColorTagsBar
{
anchors.fill: parent
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: assetsize
height: assetsize
color: bae.moodColor(0)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: moodIt(bae.moodColor(0))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: assetsize
height: assetsize
color: bae.moodColor(1)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: moodIt(bae.moodColor(1))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: assetsize
height: assetsize
color: bae.moodColor(2)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: moodIt(bae.moodColor(2))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: assetsize
height: assetsize
color: bae.moodColor(3)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: moodIt(bae.moodColor(3))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: assetsize
height: assetsize
color: bae.moodColor(4)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: moodIt(bae.moodColor(4))
}
recSize: assetsize
onColorClicked: moodIt(color)
}
}
}
......@@ -2,7 +2,6 @@ import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../utils/Icons.js" as MdiFont
import "../../utils"
MenuItem
......
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
Item
{
property int recSize : 16
signal colorClicked(string color)
RowLayout
{
anchors.fill: parent
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: recSize
height: recSize
color: bae.moodColor(0)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: colorClicked(bae.moodColor(0))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: recSize
height: recSize
color: bae.moodColor(1)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: colorClicked(bae.moodColor(1))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: recSize
height: recSize
color: bae.moodColor(2)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: colorClicked(bae.moodColor(2))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: recSize
height: recSize
color: bae.moodColor(3)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: colorClicked(bae.moodColor(3))
}
ToolButton
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Rectangle
{
anchors.centerIn: parent
width: recSize
height: recSize
color: bae.moodColor(4)
radius: 2
border.color: bae.altColor()
border.width: 1
}
onClicked: colorClicked(bae.moodColor(4))
}
}
}
......@@ -5,8 +5,6 @@ import QtQuick.Layouts 1.3
import "../view_models/BabeGrid"
import "../view_models/BabeTable"
import "../utils/Icons.js" as MdiFont
import "../utils"
import "../db/Queries.js" as Q
BabeGrid
......
......@@ -5,8 +5,6 @@ import QtQuick.Layouts 1.3
import "../view_models/BabeGrid"
import "../view_models/BabeTable"
import "../utils/Icons.js" as MdiFont
import "../utils"
import "../db/Queries.js" as Q
BabeGrid
......
......@@ -2,7 +2,6 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../utils/Icons.js" as MdiFont
import "../utils"
ToolBar
......@@ -45,7 +44,7 @@ ToolBar
id: playlistView
BabeIcon
{
text: MdiFont.Icon.headphones
icon: "headphones"
color: currentIndex === 0? accentColor : textColor
iconSize: size
}
......@@ -70,7 +69,7 @@ ToolBar
BabeIcon
{
id: tracksIcon
text: MdiFont.Icon.musicNote
icon: "musicNote"
color: currentIndex === 1? accentColor : textColor
iconSize: size
......@@ -91,7 +90,7 @@ ToolBar
BabeIcon
{
id: albumsIcon
text: MdiFont.Icon.album
icon: "album"
color: currentIndex === 2? accentColor : textColor
iconSize: size
}
......@@ -112,7 +111,7 @@ ToolBar
BabeIcon
{
id: artistsIcon
text: MdiFont.Icon.face
icon: "face"
color: currentIndex === 3? accentColor : textColor
iconSize: size
......@@ -133,7 +132,7 @@ ToolBar
BabeIcon
{
id: playlistsIcon
text: MdiFont.Icon.libraryMusic
icon: "libraryMusic"
color: currentIndex === 4? accentColor : textColor
iconSize: size
......@@ -162,7 +161,7 @@ ToolBar
BabeIcon
{
id: settingsIcon
text: MdiFont.Icon.settings
icon: "settings"
color: settingsDrawer.visible ? accentColor : textColor
iconSize: size
......
......@@ -2,7 +2,6 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../view_models/FolderPicker"
import "../utils/Icons.js" as MdiFont
import "../utils"
Popup
{
......@@ -45,7 +44,7 @@ Popup
id: goBackBtn
BabeIcon
{
text: MdiFont.Icon.arrowLeft
icon: "arrowLeft"
}
onClicked:
......
......@@ -3,7 +3,6 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import "../utils/Icons.js" as MdiFont
import "../utils/Player.js" as Player
import "../db/Queries.js" as Q
import "../utils"
......@@ -210,7 +209,7 @@ Item
id: infoBtn
BabeIcon
{
text: stackView.currentItem === list ? MdiFont.Icon.informationOutline : MdiFont.Icon.arrowLeft
icon: stackView.currentItem === list ? "informationOutline" : "arrowLeft"
}
onClicked:
{
......@@ -238,7 +237,7 @@ Item
BabeIcon
{
id: babeBtnIcon
text: MdiFont.Icon.heartOutline
icon: "heartOutline"
color: defaultColor
}
......@@ -248,14 +247,14 @@ Item
ToolButton
{
id: previousBtn
BabeIcon {text: MdiFont.Icon.skipPrevious}
BabeIcon {icon: "skipPrevious"}
onClicked: Player.previousTrack()
}
ToolButton
{
id: playBtn
BabeIcon {id: playIcon; text: MdiFont.Icon.play }
BabeIcon {id: playIcon; icon: "play" }
onClicked:
{
if(player.isPaused()) Player.resumeTrack()
......@@ -266,7 +265,7 @@ Item
ToolButton
{
id: nextBtn
BabeIcon{text: MdiFont.Icon.skipNext}
BabeIcon{ icon: "skipNext"}
onClicked: Player.nextTrack()
}
......@@ -274,7 +273,7 @@ Item
ToolButton
{
id: shuffleBtn
BabeIcon { text: shuffle ? MdiFont.Icon.shuffle : MdiFont.Icon.shuffleDisabled}
BabeIcon { icon: shuffle ? "shuffle" : "shuffleDisabled"}
onClicked: shuffle = !shuffle
}
......@@ -287,7 +286,7 @@ Item
ToolButton
{
id: menuBtn
BabeIcon {text: MdiFont.Icon.dotsVertical}
BabeIcon {icon: "dotsVertical"}
onClicked: root.isMobile ? playlistMenu.open() : playlistMenu.popup()
}
}
......
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import "../utils"
ItemDelegate
{
id: delegate
width: parent.width
height: 48
clip: true
property string textColor: ListView.isCurrentItem ? bae.hightlightTextColor() : bae.foregroundColor()
Rectangle
{
anchors.fill: parent
color: index % 2 === 0 ? bae.midColor() : "transparent"
opacity: 0.3
}
MouseArea
{
anchors.fill: parent
acceptedButtons: Qt.RightButton
onClicked:
{
if(!root.isMobile && mouse.button === Qt.RightButton)
rightClicked()
}
}
RowLayout
{
id: gridLayout
anchors.fill: parent
spacing: 20
Item
{
Layout.fillHeight: true
width: parent.height
ToolButton
{
id: playBtn
anchors.centerIn: parent
BabeIcon { icon: playlistIcon; color: textColor }
}
}
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
Layout.margins: 15
anchors.verticalCenter: parent.verticalCenter
Label
{
id: trackTitle
Layout.fillWidth: true
Layout.fillHeight: true
Layout.row: 1
Layout.column: 2
verticalAlignment: Qt.AlignVCenter
text: playlist
font.bold: true
elide: Text.ElideRight
font.pointSize: 10
color: textColor
}
}
}
}
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import "../view_models"
ListView
......@@ -27,11 +30,49 @@ ListView
NumberAnimation { properties: "x,y"; duration: 1000 }
}
Rectangle
{
anchors.fill: parent
color: bae.altColor()
z: -999
}
footerPositioning: ListView.OverlayFooter
footer: ColorTagsBar
{
width: parent.width
height: 48
recSize: 22
// onColorClicked: moodIt(color)
}
BabeHolder
{
id: holder
visible: playlistListRoot.count === 0
}
ListModel
{
id: playlistListModel
ListElement { playlist: qsTr("Most Played"); playlistIcon: "trendingUp"}
ListElement { playlist: qsTr("Favorites"); playlistIcon: "starCircle"}
ListElement { playlist: qsTr("Recent"); playlistIcon: "clock"}
ListElement { playlist: qsTr("Babes"); playlistIcon: "heart"}
ListElement { playlist: qsTr("Online"); playlistIcon: "youtubePlay"}
ListElement { playlist: qsTr("Tags"); playlistIcon: "tagMultiple"}
ListElement { playlist: qsTr("Rleationships"); playlistIcon: "tagFaces"}
ListElement { playlist: qsTr("Popular"); playlistIcon: "fire"}
ListElement { playlist: qsTr("Genres"); playlistIcon: "attachment"}
}
model: playlistListModel
delegate : PlaylistViewDelegate
{
id: delegate
width: playlistListRoot.width
}
}
......@@ -3,7 +3,6 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import Qt.labs.platform 1.0
import "../utils/Icons.js" as MdiFont
import "../utils"