Commit bf1922f0 authored by camilo higuita's avatar camilo higuita

needed fixes fro new mauikit changes

parent 9373ff7a
......@@ -28,7 +28,7 @@ import "db/Queries.js" as Q
import "utils/Help.js" as H
import "utils/Player.js" as Player
import org.kde.kirigami 2.6 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
import Player 1.0
import AlbumsList 1.0
......@@ -152,7 +152,7 @@ Maui.ApplicationWindow
/* UI */
accentColor: babeColor
// accentColor: babeColor
// headBarFGColor: altColorText
// headBarBGColor: "#212121"
// altColorText: darkTextColor
......@@ -296,17 +296,18 @@ Maui.ApplicationWindow
}
}
Kirigami.Separator
{
Layout.fillWidth: true
color: borderColor
}
// Kirigami.Separator
// {
// Layout.fillWidth: true
//// color: borderColor
// }
Maui.ToolBar
{
Layout.fillHeight: true
Layout.fillWidth: true
position: ToolBar.Footer
leftContent: ToolButton
{
icon.name: "headphones"
......@@ -648,7 +649,6 @@ Maui.ApplicationWindow
contentItem: MainPlaylist
{
id: mainPlaylist
z: 999
Connections
{
target: mainPlaylist
......@@ -954,47 +954,44 @@ Maui.ApplicationWindow
Layout.bottomMargin: space.big
onIconClicked: _contextMenu.popup()
onExitClicked: clear()
colorScheme.backgroundColor: "#212121"
Kirigami.Theme.backgroundColor: "#212121"
model: BaseModel
{
list: _selectionBarModelList
}
// model: BaseModel
// {
// list: _selectionBarModelList
// }
Tracks
{
id: _selectionBarModelList
}
// Tracks
// {
// id: _selectionBarModelList
// }
SelectionBarMenu
{
id: _contextMenu
}
function append(item)
{
if(selectedPaths.indexOf(item.path) < 0)
{
selectedItems.push(item)
selectedPaths.push(item.path)
// for(var i = 0; i < selectionList.count ; i++ )
// if(selectionList.model.get(i).path === item.path)
// {
// selectionList.model.remove(i)
// return
// }
// function append(item)
// {
// _selectionBar.append(item)
selectionList.model.list.append(item)
selectionList.positionViewAtEnd()
//// if(selectedPaths.indexOf(item.path) < 0)
//// {
//// selectedItems.push(item)
//// selectedPaths.push(item.path)
if(position === Qt.Vertical) return
//// // for(var i = 0; i < selectionList.count ; i++ )
//// // if(selectionList.model.get(i).path === item.path)
//// // {
//// // selectionList.model.remove(i)
//// // return
//// // }
if(typeof(riseContent) === "undefined") return
//// selectionList.model.list.append(item)
//// selectionList.positionViewAtEnd()
riseContent()
}
}
//// }
// }
}
}
......
......@@ -35,6 +35,7 @@ signals:
public slots:
QVariantMap get(const int &index) const;
// void remove(const int &index);
void clear();
};
......
......@@ -3,6 +3,7 @@ import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import AlbumsList 1.0
import org.kde.kirigami 2.7 as Kirigami
ItemDelegate
{
......@@ -13,7 +14,7 @@ ItemDelegate
property int albumSize : iconSizes.huge
property int albumRadius : 0
property bool albumCard : true
property string fillColor : Qt.darker(backgroundColor, 1.1)
property string fillColor : Qt.darker(Kirigami.Theme.backgroundColor, 1.1)
property bool hide : false
property bool showLabels : true
property bool showIndicator : false
......@@ -21,7 +22,7 @@ ItemDelegate
property bool hideRepeated : false
property bool increaseCurrentItem : false
property color labelColor : GridView.isCurrentItem || hovered || down ? highlightColor : textColor
property color labelColor : GridView.isCurrentItem || hovered || down ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
// height: typeof album === 'undefined' ? parseInt(albumSize+(albumSize*0.3)) : parseInt(albumSize+(albumSize*0.4))
readonly property bool sameAlbum :
......
import QtQuick.Controls 2.2
import QtQuick 2.9
import ".."
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
import BaseModel 1.0
......@@ -13,7 +13,7 @@ Maui.Page
// readonly property int screenSize : bae.screenGeometry("width")*bae.screenGeometry("height");
// property int hintSize : Math.sqrt(root.width*root.height)*0.3
property int albumCoverSize: Math.min(iconSizes.enormous, width * 0.3)
property int albumCoverSize: Math.min(120, width * 0.3)
readonly property int albumSpacing: albumCoverSize * 0.3 + space.small
property int albumCoverRadius : radiusV
......
......@@ -277,12 +277,12 @@ BabeList
label: section
isSection: true
boldLabel: true
colorScheme.backgroundColor: "#333"
colorScheme.textColor: "#fafafa"
Kirigami.Theme.backgroundColor: "#333"
Kirigami.Theme.textColor: "#fafafa"
background: Rectangle
{
color: colorScheme.backgroundColor
color: Kirigami.Theme.backgroundColor
}
}
......
......@@ -3,7 +3,7 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.2 as Kirigami
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
......@@ -27,8 +27,8 @@ SwipeDelegate
}
property bool isCurrentListItem : ListView.isCurrentItem
property color bgColor : backgroundColor
property string labelColor: isCurrentListItem ? highlightedTextColor : textColor
property color bgColor : Kirigami.Theme.backgroundColor
property string labelColor: isCurrentListItem ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
property bool number : false
property bool quickPlay : true
property bool coverArt : false
......@@ -61,7 +61,7 @@ SwipeDelegate
background: Rectangle
{
height: delegateRoot.height
color: isCurrentListItem || hovered ? highlightColor : (trackMood.length > 0 ? Qt.tint(bgColor, Qt.rgba(Qt.lighter(trackMood, 1.3).r,
color: isCurrentListItem || hovered ? Kirigami.Theme.highlightColor : (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 ) ):
......@@ -89,7 +89,7 @@ SwipeDelegate
icon.name: "love"
anchors.verticalCenter: parent.verticalCenter
icon.color: model.fav === "1" ? babeColor : textColor
icon.color: model.fav === "1" ? babeColor : Kirigami.Theme.textColor
onClicked:
{
list.fav(index, !(list.get(index).fav == "1"))
......@@ -192,7 +192,7 @@ SwipeDelegate
width: artworkCover.adapt ? artworkCover.width : Math.min(artworkCover.width, artworkCover.height)
height: artworkCover.adapt ? artworkCover.height : width
radius: Kirigami.Units.devicePixelRatio *3
border.color: altColor
// border.color: Kirigami.Theme.View.
border.width: Kirigami.Units.devicePixelRatio *3
}
}
......
......@@ -3,6 +3,7 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.7 as Kirigami
import "../../view_models"
Maui.Dialog
......@@ -17,7 +18,7 @@ Maui.Dialog
property int currentView : 0
colorScheme.backgroundColor: darkDarkColor
Kirigami.Theme.backgroundColor: darkDarkColor
clip: true
......@@ -35,7 +36,7 @@ Maui.Dialog
Maui.Holder
{
id: lyricsHolder
colorScheme.textColor: darkTextColor
Kirigami.Theme.textColor: darkTextColor
visible: lyricsText.text.length > 0 ? false : true
message: "Couldn't find the lyrics!"
}
......
import QtQuick.Controls 2.2
import QtQuick 2.9
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.7 as Kirigami
import "../../view_models/BabeGrid"
import org.kde.kirigami 2.0 as Kirigami
import "../../utils/Player.js" as Player
ListView
......@@ -79,7 +79,7 @@ ListView
Layout.fillWidth: true
Layout.fillHeight: true
text: model.title
color: textColor
color: Kirigami.Theme.textColor
font.pointSize: fontSizes.default
verticalAlignment: Qt.AlignBottom
clip: true
......@@ -97,30 +97,30 @@ ListView
font.pointSize: fontSizes.small
verticalAlignment: Qt.AlignTop
clip: true
color: textColor
color: Kirigami.Theme.textColor
elide: Text.ElideRight
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
}
MouseArea
{
anchors.fill : parent
preventStealing: true
// parent: applicationWindow().overlay.parent
// MouseArea
// {
// anchors.fill : parent
// preventStealing: true
//// parent: applicationWindow().overlay.parent
onPressed:
{
console.log("albumsroll clicked")
mouse.accepted = false
}
// onPressed:
// {
// console.log("albumsroll clicked")
// mouse.accepted = false
// }
onReleased:
{
mouse.accepted = true
}
}
// onReleased:
// {
// mouse.accepted = true
// }
// }
function positionAlbum(index)
{
......
......@@ -92,7 +92,7 @@ Maui.Page
Rectangle
{
anchors.fill: parent
color: viewBackgroundColor
color: Kirigami.Theme.viewBackgroundColor
opacity: 0.85
}
}
......
......@@ -31,7 +31,7 @@ Menu
{
mainPlaylist.list.clear()
var tracks = _selectionBarModelList.getAll()
var tracks = _selectionBar.selectedItems
for(var i in tracks)
Player.appendTrack(tracks[i])
......@@ -42,7 +42,7 @@ Menu
MenuItem
{
text: qsTr("Append...")
onTriggered: Player.appendAll(_selectionBarModelList.getAll())
onTriggered: Player.appendAll(_selectionBar.selectedItems)
}
MenuItem
......@@ -50,24 +50,24 @@ Menu
text: qsTr("Queue")
onTriggered:
{
Player.queueTracks(_selectionBarModelList.getAll())
Player.queueTracks(_selectionBar.selectedItems)
close()
}
}
MenuSeparator {}
// MenuSeparator {}
MenuItem
{
text: qsTr("Fav/UnFav them")
onTriggered:
{
for(var i= 0; i < _selectionBar.count; i++)
_selectionBarModelList.fav(i, !(_selectionBarModelList.get(i).fav == "1"))
// MenuItem
// {
// text: qsTr("Fav/UnFav them")
// onTriggered:
// {
// for(var i= 0; i < _selectionBar.count; i++)
// _selectionBarModelList.fav(i, !(_selectionBarModelList.get(i).fav == "1"))
}
}
// }
// }
MenuItem
......@@ -106,109 +106,109 @@ Menu
}
}
MenuSeparator {}
MenuItem
{
id: starsRow
width: parent.width
height: iconSizes.medium + space.small
RowLayout
{
anchors.fill: parent
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
icon.name: starIcon
icon.width: iconSizes.medium
icon.color: rate >= 1 ? starColor :starReg
onClicked:
{
rate = 1
}
}
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
icon.width: iconSizes.medium
icon.name: starIcon
icon.color: rate >= 2 ? starColor :starReg
onClicked:
{
rate = 2
}
}
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
icon.width: iconSizes.medium
icon.name: starIcon
icon.color: rate >= 3 ? starColor :starReg
onClicked:
{
rate = 3
}
}
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
icon.width: iconSizes.medium
icon.name: starIcon
icon.color: rate >= 4 ? starColor :starReg
onClicked:
{
rate = 4
}
}
ToolButton
{
Layout.fillWidth: true
Layout.fillHeight: true
icon.width: iconSizes.medium
icon.name: starIcon
icon.color: rate >= 5 ? starColor :starReg
onClicked:
{
rate = 5
}
}
}
}
onRateChanged:
{
close()
for(var i= 0; i < _selectionBar.count; i++)
_selectionBarModelList.rate(i, control.rate)
}
MenuItem
{
id: colorsRow
width: parent.width
height: iconSizes.medium + space.small
ColorTagsBar
{
anchors.fill: parent
onColorClicked:
{
for(var i= 0; i < _selectionBar.count; i++)
_selectionBarModelList.color(i, color)
control.close()
}
}
}
// MenuSeparator {}
// MenuItem
// {
// id: starsRow
// width: parent.width
// height: iconSizes.medium + space.small
// RowLayout
// {
// anchors.fill: parent
// ToolButton
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// icon.name: starIcon
// icon.width: iconSizes.medium
// icon.color: rate >= 1 ? starColor :starReg
// onClicked:
// {
// rate = 1
// }
// }
// ToolButton
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// icon.width: iconSizes.medium
// icon.name: starIcon
// icon.color: rate >= 2 ? starColor :starReg
// onClicked:
// {
// rate = 2
// }
// }
// ToolButton
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// icon.width: iconSizes.medium
// icon.name: starIcon
// icon.color: rate >= 3 ? starColor :starReg
// onClicked:
// {
// rate = 3
// }
// }
// ToolButton
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// icon.width: iconSizes.medium
// icon.name: starIcon
// icon.color: rate >= 4 ? starColor :starReg
// onClicked:
// {
// rate = 4
// }
// }
// ToolButton
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// icon.width: iconSizes.medium
// icon.name: starIcon
// icon.color: rate >= 5 ? starColor :starReg
// onClicked:
// {
// rate = 5
// }
// }
// }
// }
// onRateChanged:
// {
// close()
// for(var i= 0; i < _selectionBar.count; i++)
// _selectionBarModelList.rate(i, control.rate)
// }
// MenuItem
// {
// id: colorsRow
// width: parent.width
// height: iconSizes.medium + space.small
// ColorTagsBar
// {
// anchors.fill: parent
// onColorClicked:
// {
// for(var i= 0; i < _selectionBar.count; i++)
// _selectionBarModelList.color(i, color)
// control.close()
// }
// }
// }
}
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