Commit 89bb91ca authored by Camilo Higuita's avatar Camilo Higuita

template fixes for mobile and desktop and done for tonight

parent 75af6e0a
......@@ -31,6 +31,8 @@ Kirigami.ApplicationWindow
property int toolBarIconSize: bae.loadSetting("ICON_SIZE", "BABE", isMobile ? 24 : 22)
property int toolBarHeight : isMobile ? 48 : toolBarIconSize *2
property int contentMargins : 15
property string babeColor : bae.babeColor()
property string babeAltColor : bae.babeAltColor()
property string backgroundColor : bae.backgroundColor()
......
......@@ -10,18 +10,17 @@ ItemDelegate
height: rowHeightAlt
property alias label: labelTxt.text
property string textColor: ListView.isCurrentItem ? highlightTextColor : foregroundColor
ColumnLayout
{
anchors.fill: parent
Layout.margins: 10
Label
{
id: labelTxt
Layout.margins: 20
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: contentMargins
anchors.verticalCenter: parent.verticalCenter
width: parent.width
height: parent.height
......@@ -31,7 +30,7 @@ ItemDelegate
text: labelTxt.text
elide: Text.ElideRight
color: foregroundColor
color: textColor
}
}
}
......@@ -94,7 +94,7 @@ ColumnLayout
id: albumInfoRow
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: 15
Layout.margins: contentMargins
spacing: 5
......
......@@ -56,4 +56,6 @@ ListView
z: -999
}
ScrollBar.vertical:BabeScrollBar { }
}
......@@ -8,6 +8,8 @@ Popup
width: parent.width *0.8
height: parent.height *0.8
padding: 0
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
......
......@@ -8,7 +8,7 @@ ScrollBar
position: 0.2
active: true
focus: true
visible: !root.isMobile
// visible: !root.isMobile
background : Rectangle
{
radius: 12
......
......@@ -160,8 +160,6 @@ BabeList
}
}
ScrollBar.vertical:BabeScrollBar { }
function openItemMenu(index)
{
currentIndex = index
......@@ -176,11 +174,8 @@ BabeList
{
var trackList = []
for(var i = 0; i < list.model.count; ++i)
{
trackList.push(list.model.get(i).url);
}
trackList.push(list.model.get(i).url)
console.log(trackList)
playlistDialog.tracks = trackList
playlistDialog.open()
}
......
......@@ -22,8 +22,10 @@ BabeDialog
BabeList
{
id: playlistsList
width: parent.width
height: parent.height
holder.message: "<h2>There's not playlists</h2><br><p>Create a new one and start adding tracks to it<p/>"
ListModel { id: listModel }
model: listModel
......@@ -31,7 +33,6 @@ BabeDialog
delegate: BabeDelegate
{
id: delegate
label: playlist
Connections
......
......@@ -135,7 +135,7 @@ ItemDelegate
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
Layout.margins: 15
Layout.margins: contentMargins
anchors.verticalCenter: parent.verticalCenter
......
......@@ -24,6 +24,7 @@ BabePopup
RowLayout
{
Layout.margins: contentMargins
Layout.fillWidth: true
width:parent.width
......
......@@ -14,7 +14,6 @@ BabeList
signal rowClicked(int index)
signal rowPressed(int index)
ListModel { id: listModel }
model: listModel
......@@ -34,6 +33,4 @@ BabeList
}
}
}
ScrollBar.vertical: ScrollBar { }
}
......@@ -155,12 +155,16 @@ Item
z: -999
}
PlaylistMenu
{
id: playlistMenu
onClearOut: Player.clearOutPlaylist()
onHideCover: cover.visible = !cover.visible
onClean: Player.cleanPlaylist()
onSaveToClicked: list.saveList()
}
MouseArea
......
......@@ -9,7 +9,7 @@ BabeMenu
signal clean()
signal callibrate()
signal hideCover()
signal saveToClicked()
BabeMenuItem
{
text: qsTr("Clear out...")
......@@ -36,8 +36,8 @@ BabeMenu
BabeMenuItem
{
text: qsTr("Save as playlist...")
onTriggered: {}
text: qsTr("Save list to...")
onTriggered: saveToClicked()
}
}
......@@ -71,7 +71,7 @@ Item
{
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Layout.margins: 20
Layout.margins: contentMargins
width: parent.width
Image
{
......
......@@ -120,6 +120,4 @@ BabeList
}
}
}
ScrollBar.vertical:BabeScrollBar {}
}
......@@ -48,11 +48,12 @@ BabePopup
anchors.centerIn: parent
Row
{
Layout.margins: contentMargins
id: sourceActions
Layout.fillWidth: true
Layout.alignment: Qt.AlignRight
height: 48
height: toolBarHeight
BabeButton
{
......@@ -81,8 +82,6 @@ BabePopup
}
}
BabeList
{
id: sources
......@@ -101,11 +100,8 @@ BabePopup
Connections
{
target: delegate
onClicked:
{
sources.currentIndex = index
list.rowClicked(index)
}
onClicked: sources.currentIndex = index
}
}
......
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