Commit 8fb4e81d authored by camilo higuita's avatar camilo higuita

fixes on not longer using fmlist own namespace

parent eb3fa795
......@@ -30,7 +30,6 @@ import "utils/Player.js" as Player
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
import FMList 1.0
import Player 1.0
import AlbumsList 1.0
import TracksList 1.0
......@@ -164,8 +163,8 @@ Maui.ApplicationWindow
headBar.spacing: space.big
headBar.middleContent : Kirigami.ActionToolBar
{
display: ToolButton.TextUnderIcon
display: isWide ? ToolButton.TextBesideIcon : ToolButton.TextUnderIcon
Layout.fillWidth: true
hiddenActions: [
Kirigami.Action
......@@ -213,10 +212,13 @@ Maui.ApplicationWindow
onTriggered: currentView = viewsIndex.albums
// colorScheme.highlightColor: babeColor
// showIndicator: true
},
Kirigami.Action
{
Layout.fillWidth: true
text: qsTr("Artists")
checkable: false
checked: currentView === viewsIndex.artists
......@@ -229,6 +231,8 @@ Maui.ApplicationWindow
Kirigami.Action
{
Layout.fillWidth: true
text: qsTr("Playlists")
checkable: false
checked: currentView === viewsIndex.playlists
......@@ -471,7 +475,7 @@ Maui.ApplicationWindow
onTriggered:
{
fmDialog.onlyDirs = false
fmDialog.filterType = FMList.AUDIO
fmDialog.filterType = Maui.FMList.AUDIO
fmDialog.show(function(paths)
{
vvave.openUrls(paths)
......@@ -679,6 +683,7 @@ Maui.ApplicationWindow
// babeitView.logginDialog.open()
}
TracksView
{
id: tracksView
......
......@@ -195,8 +195,8 @@ Maui.Page
model: ListModel{}
appendBtn.visible: false
playAllBtn.visible: false
// appendBtn.visible: false
// playAllBtn.visible: false
headBar.rightContent: Maui.ToolButton
{
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.2 as Kirigami
import QtQuick.Controls.Material 2.1
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
Maui.Page
......@@ -10,13 +9,10 @@ Maui.Page
id: control
property alias listView : babeList
property alias listView : babeList.listView
property alias model : babeList.model
property alias delegate : babeList.delegate
property alias count : babeList.count
property alias currentIndex : babeList.currentIndex
property alias currentItem : babeList.currentItem
......@@ -37,60 +33,55 @@ Maui.Page
focus: true
}
ListView
Maui.ListBrowser
{
id: babeList
anchors.fill: parent
clip: true
highlight: Rectangle
{
width: babeList.width
height: babeList.currentItem.height
color: highlightColor
}
focus: true
interactive: true
highlightFollowsCurrentItem: true
highlightMoveDuration: 0
keyNavigationWraps: true
keyNavigationEnabled : true
// listView.highlight: Rectangle
// {
// width: babeList.width
// height: babeList.currentItem.height
// color: highlightColor
// }
Keys.onUpPressed: decrementCurrentIndex()
Keys.onDownPressed: incrementCurrentIndex()
Keys.onReturnPressed: rowClicked(currentIndex)
Keys.onEnterPressed: quickPlayTrack(currentIndex)
// Keys.onUpPressed: decrementCurrentIndex()
// Keys.onDownPressed: incrementCurrentIndex()
// Keys.onReturnPressed: rowClicked(currentIndex)
// Keys.onEnterPressed: quickPlayTrack(currentIndex)
boundsBehavior: !isMobile? Flickable.StopAtBounds : Flickable.OvershootBounds
flickableDirection: Flickable.AutoFlickDirection
// boundsBehavior: !isMobile? Flickable.StopAtBounds : Flickable.OvershootBounds
// flickableDirection: Flickable.AutoFlickDirection
// snapMode: isMobile? ListView.SnapToItem : ListView.NoSnap
addDisplaced: Transition
{
NumberAnimation { properties: "x,y"; duration: 100 }
}
// addDisplaced: Transition
// {
// NumberAnimation { properties: "x,y"; duration: 100 }
// }
ScrollBar.vertical:BabeScrollBar { visible: !isMobile}
// ScrollBar.vertical:BabeScrollBar { visible: !isMobile}
onContentYChanged:
{
if(contentY < -120)
wasPulled = true
// onContentYChanged:
// {
// if(contentY < -120)
// wasPulled = true
if(contentY == 0 && wasPulled)
{ pulled(); wasPulled = false}
}
// if(contentY == 0 && wasPulled)
// { pulled(); wasPulled = false}
// }
// Scroll is too fast on desktop, see QTBUG-56075
// https://bugreports.qt.io/browse/QTBUG-56075
ScrollHelper
{
enabled: !isMobile
id: scrollHelper
flickable: babeList
anchors.fill: babeList
}
// ScrollHelper
// {
// enabled: !isMobile
// id: scrollHelper
// flickable: babeList
// anchors.fill: babeList
// }
}
}
......@@ -61,7 +61,6 @@ BabeList
headBar.rightContent: Kirigami.ActionToolBar
{
Layout.fillWidth: true
actions: [
Kirigami.Action
{
......@@ -90,78 +89,78 @@ BabeList
onTriggered: list.sortBy = Tracks.TITLE
}
Kirigami.Action
{
text: qsTr("Track")
checkable: true
checked: list.sortBy === Tracks.TRACK
onTriggered: list.sortBy = Tracks.TRACK
}
Kirigami.Action
{
text: qsTr("Artist")
checkable: true
checked: list.sortBy === Tracks.ARTIST
onTriggered: list.sortBy = Tracks.ARTIST
}
Kirigami.Action
{
text: qsTr("Album")
checkable: true
checked: list.sortBy === Tracks.ALBUM
onTriggered: list.sortBy = Tracks.ALBUM
}
Kirigami.Action
{
text: qsTr("Most played")
checkable: true
checked: list.sortBy === Tracks.COUNT
onTriggered: list.sortBy = Tracks.COUNT
}
Kirigami.Action
{
text: qsTr("Rate")
checkable: true
checked: list.sortBy === Tracks.RATE
onTriggered: list.sortBy = Tracks.RATE
}
Kirigami.Action
{
text: qsTr("Fav")
checkable: true
checked: list.sortBy === Tracks.FAV
onTriggered: list.sortBy = Tracks.FAV
}
Kirigami.Action
{
text: qsTr("Release date")
checkable: true
checked: list.sortBy === Tracks.RELEASEDATE
onTriggered: list.sortBy = Tracks.RELEASEDATE
}
Kirigami.Action
{
text: qsTr("Add date")
checkable: true
checked: list.sortBy === Tracks.ADDDATE
onTriggered: list.sortBy = Tracks.ADDDATE
}
Kirigami.Action
{
text: qsTr("Group")
checkable: true
checked: group
onTriggered: group = !group
}
// Kirigami.Action
// {
// text: qsTr("Track")
// checkable: true
// checked: list.sortBy === Tracks.TRACK
// onTriggered: list.sortBy = Tracks.TRACK
// }
// Kirigami.Action
// {
// text: qsTr("Artist")
// checkable: true
// checked: list.sortBy === Tracks.ARTIST
// onTriggered: list.sortBy = Tracks.ARTIST
// }
// Kirigami.Action
// {
// text: qsTr("Album")
// checkable: true
// checked: list.sortBy === Tracks.ALBUM
// onTriggered: list.sortBy = Tracks.ALBUM
// }
// Kirigami.Action
// {
// text: qsTr("Most played")
// checkable: true
// checked: list.sortBy === Tracks.COUNT
// onTriggered: list.sortBy = Tracks.COUNT
// }
// Kirigami.Action
// {
// text: qsTr("Rate")
// checkable: true
// checked: list.sortBy === Tracks.RATE
// onTriggered: list.sortBy = Tracks.RATE
// }
// Kirigami.Action
// {
// text: qsTr("Fav")
// checkable: true
// checked: list.sortBy === Tracks.FAV
// onTriggered: list.sortBy = Tracks.FAV
// }
// Kirigami.Action
// {
// text: qsTr("Release date")
// checkable: true
// checked: list.sortBy === Tracks.RELEASEDATE
// onTriggered: list.sortBy = Tracks.RELEASEDATE
// }
// Kirigami.Action
// {
// text: qsTr("Add date")
// checkable: true
// checked: list.sortBy === Tracks.ADDDATE
// onTriggered: list.sortBy = Tracks.ADDDATE
// }
// Kirigami.Action
// {
// text: qsTr("Group")
// checkable: true
// checked: group
// onTriggered: group = !group
// }
},
Kirigami.Action
......@@ -270,10 +269,6 @@ BabeList
}
}
listView.highlightFollowsCurrentItem: false
listView.highlightMoveDuration: 0
listView.highlight: Rectangle { }
section.criteria: ViewSection.FullString
section.delegate: Maui.LabelDelegate
{
......
......@@ -22,7 +22,6 @@ BabeTable
holder.emojiSize: iconSizes.huge
list.query: Q.GET.allTracks
}
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