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

fix layout issues and sourcesdialog

parent 99d5fe15
...@@ -329,6 +329,8 @@ Kirigami.ApplicationWindow ...@@ -329,6 +329,8 @@ Kirigami.ApplicationWindow
Slider Slider
{ {
id: progressBar id: progressBar
// height: 10
width: parent.width width: parent.width
z: 999 z: 999
anchors.left: parent.left anchors.left: parent.left
...@@ -389,20 +391,33 @@ Kirigami.ApplicationWindow ...@@ -389,20 +391,33 @@ Kirigami.ApplicationWindow
} }
RowLayout
GridLayout
{ {
anchors.fill: parent anchors.fill: parent
height: parent.height height: parent.height
width: parent.width width: parent.width
rowSpacing: 0
columnSpacing: 0
rows: 2
columns: 3
Item Item
{ {
Layout.fillHeight: true
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true Layout.fillHeight: true
Layout.maximumWidth: miniArtwork.visible ? headerHeight : 0
Layout.minimumWidth: miniArtwork.visible ? headerHeight : 0
Layout.minimumHeight: miniArtwork.visible ? headerHeight : 0
Layout.maximumHeight: miniArtwork.visible ? headerHeight : 0
Layout.row: 1
Layout.rowSpan: 2
Layout.column: 1
height: headerHeight // height: headerHeight
width: miniArtwork.visible ? headerHeight : 0 // width: miniArtwork.visible ? headerHeight : 0
Image Image
{ {
...@@ -436,29 +451,23 @@ Kirigami.ApplicationWindow ...@@ -436,29 +451,23 @@ Kirigami.ApplicationWindow
} }
} }
Item
GridLayout
{ {
Layout.fillHeight: true
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter Layout.fillHeight: true
rows: 2 Layout.row: 2
columns: 7 Layout.column: 2
Layout.maximumHeight: playbackInfo.visible ? playbackInfo.font.pointSize*2 : 0
Label Label
{ {
id: playbackInfo id: playbackInfo
visible: mainlistEmpty && infoLabels visible: mainlistEmpty && infoLabels
anchors.top: playIcon.bottom // anchors.top: playIcon.bottom
anchors.horizontalCenter: playIcon.horizontalCenter // anchors.horizontalCenter: playIcon.horizontalCenter
Layout.alignment: Qt.AlignCenter width: parent.width
Layout.fillWidth: true height: parent.height
Layout.row: 2
Layout.column: 1
Layout.columnSpan: 7
Layout.maximumWidth: root.width * 0.5
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
text: progressTimeLabel + " / " + (currentTrack ? (currentTrack.title ? currentTrack.title + " - " + currentTrack.artist : "--- - "+currentTrack.artist) : "") + " / " + durationTimeLabel text: progressTimeLabel + " / " + (currentTrack ? (currentTrack.title ? currentTrack.title + " - " + currentTrack.artist : "--- - "+currentTrack.artist) : "") + " / " + durationTimeLabel
...@@ -466,26 +475,19 @@ Kirigami.ApplicationWindow ...@@ -466,26 +475,19 @@ Kirigami.ApplicationWindow
font.pointSize: fontSizes.tiny font.pointSize: fontSizes.tiny
elide: Text.ElideRight elide: Text.ElideRight
} }
}
Item RowLayout
{ {
Layout.fillWidth: true Layout.fillWidth: true
Layout.row: 1 Layout.fillHeight: true
Layout.column: 1 Layout.alignment: Qt.AlignCenter
Layout.row: 1
Rectangle Layout.column: 2
{
anchors.fill: parent
color: "blue"
z: -999
}
}
BabeButton BabeButton
{ {
id: babeBtnIcon id: babeBtnIcon
Layout.row: 1
Layout.column: 2
iconName: "love" iconName: "love"
iconColor: currentBabe ? babeColor : defaultColor iconColor: currentBabe ? babeColor : defaultColor
...@@ -500,8 +502,6 @@ Kirigami.ApplicationWindow ...@@ -500,8 +502,6 @@ Kirigami.ApplicationWindow
BabeButton BabeButton
{ {
id: previousBtn id: previousBtn
Layout.row: 1
Layout.column: 3
iconName: "media-skip-backward" iconName: "media-skip-backward"
onClicked: Player.previousTrack() onClicked: Player.previousTrack()
...@@ -511,8 +511,6 @@ Kirigami.ApplicationWindow ...@@ -511,8 +511,6 @@ Kirigami.ApplicationWindow
BabeButton BabeButton
{ {
id: playIcon id: playIcon
Layout.row: 1
Layout.column: 4
iconName: isPlaying ? "media-playback-pause" : "media-playback-start" iconName: isPlaying ? "media-playback-pause" : "media-playback-start"
onClicked: onClicked:
...@@ -525,8 +523,6 @@ Kirigami.ApplicationWindow ...@@ -525,8 +523,6 @@ Kirigami.ApplicationWindow
BabeButton BabeButton
{ {
id: nextBtn id: nextBtn
Layout.row: 1
Layout.column: 5
iconName: "media-skip-forward" iconName: "media-skip-forward"
onClicked: Player.nextTrack() onClicked: Player.nextTrack()
...@@ -536,36 +532,23 @@ Kirigami.ApplicationWindow ...@@ -536,36 +532,23 @@ Kirigami.ApplicationWindow
BabeButton BabeButton
{ {
id: shuffleBtn id: shuffleBtn
Layout.row: 1
Layout.column: 6
iconName: shuffle ? "media-playlist-shuffle" : "media-playlist-repeat" iconName: shuffle ? "media-playlist-shuffle" : "media-playlist-repeat"
onClicked: shuffle = !shuffle onClicked: shuffle = !shuffle
} }
Item
{
Layout.fillWidth: true
Layout.row: 1
Layout.column: 7
Rectangle
{
anchors.fill: parent
color: "blue"
z: -999
}
}
} }
Item Item
{ {
Layout.alignment: Qt.AlignLeft
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.maximumWidth: miniArtwork.visible ? headerHeight : 0
Layout.minimumWidth: miniArtwork.visible ? headerHeight : 0
Layout.alignment: Qt.AlignRight Layout.minimumHeight: miniArtwork.visible ? headerHeight : 0
height: headerHeight Layout.maximumHeight: miniArtwork.visible ? headerHeight : 0
width: miniArtwork.visible ? headerHeight : 0 Layout.row: 1
Layout.rowSpan: 2
Layout.column: 3
} }
} }
......
...@@ -27,6 +27,7 @@ BabeDialog ...@@ -27,6 +27,7 @@ BabeDialog
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
headerBarVisible: false
holder.message: "<h2>There's not playlists</h2><br><p>Create a new one and start adding tracks to it<p/>" holder.message: "<h2>There's not playlists</h2><br><p>Create a new one and start adding tracks to it<p/>"
ListModel { id: listModel } ListModel { id: listModel }
model: listModel model: listModel
......
...@@ -6,7 +6,6 @@ import QtQuick.Controls.Material 2.1 ...@@ -6,7 +6,6 @@ import QtQuick.Controls.Material 2.1
BabePopup BabePopup
{ {
property alias dirList : dirList
signal pathClicked(var path) signal pathClicked(var path)
signal accepted(var path) signal accepted(var path)
signal goBack(var path) signal goBack(var path)
...@@ -59,7 +58,7 @@ BabePopup ...@@ -59,7 +58,7 @@ BabePopup
headerBarRight: Button headerBarRight: Button
{ {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
onClicked: {accepted(dirList.currentUrl); close()} onClicked: {accepted(currentUrl); close()}
text: "Accept" text: "Accept"
Material.accent: babeColor Material.accent: babeColor
......
...@@ -44,6 +44,7 @@ BabePopup ...@@ -44,6 +44,7 @@ BabePopup
BabeList BabeList
{ {
id: sources id: sources
anchors.fill: parent
headerBarVisible: true headerBarVisible: true
headerBarExit: true headerBarExit: true
headerBarTitle: qsTr("Sources") headerBarTitle: qsTr("Sources")
...@@ -91,17 +92,18 @@ BabePopup ...@@ -91,17 +92,18 @@ BabePopup
} }
} }
] ]
}
Component.onCompleted: onOpened:
{
var map = bae.get("select * from folders order by strftime(\"%s\", addDate) desc")
for(var i in map)
{ {
var map = bae.get("select url from folders order by strftime(\"%s\", addDate) desc") console.log(map[i].url)
for(var i in map) sources.model.append(map[i])
model.append(map[i])
} }
} }
} }
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