Commit 327463cf authored by Camilo Higuita's avatar Camilo Higuita

feature freeze for beta release. still missing to fix pulpo issues

parent 795e31de
breeze-icons @ eec9316a
Subproject commit c0c4e4f46ae1dc332277c71a4024dd0eb592c51a
Subproject commit eec9316affab457604562f975c8a31cbfd427ae2
......@@ -67,7 +67,8 @@ SOURCES += main.cpp \
services/local/youtubedl.cpp
RESOURCES += qml.qrc
RESOURCES += qml.qrc \
kirigami-icons.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
......
......@@ -12,5 +12,7 @@
<file alias="org/kde/kirigami/icons/view-list-icons.svg">3rdparty/breeze-icons/icons/actions/32/view-list-icons.svg</file>
<file alias="org/kde/kirigami/icons/applications-graphics.svg">3rdparty/breeze-icons/icons/categories/32/applications-graphics.svg</file>
<file alias="org/kde/kirigami/icons/media-record-symbolic.svg">3rdparty/breeze-icons/icons/actions/symbolic/media-record-symbolic.svg</file>
<file>3rdparty/breeze-icons/icons/actions/22/folder-new.svg</file>
<file>3rdparty/breeze-icons/icons/places/22/folder.svg</file>
</qresource>
</RCC>
......@@ -117,8 +117,8 @@ Kirigami.ApplicationWindow
property int toolBarHeight : isMobile ? 48 : toolBarIconSize *2
property int miniArtSize : isMobile ? 36 : 30
property int columnWidth: Kirigami.Units.gridUnit * 15
property int coverSize: isMobile ? Math.sqrt(root.width*root.height)*0.4 : columnWidth * 0.8
property int columnWidth: Kirigami.Units.gridUnit * 19
property int coverSize: isMobile ? Math.sqrt(root.width*root.height)*0.4 : columnWidth * 0.6
property int currentView : viewsIndex.tracks
/*USEFUL PROPS*/
......@@ -240,12 +240,6 @@ Kirigami.ApplicationWindow
currentView = viewsIndex.search
searchView.searchInput.forceActiveFocus()
}
onYoutubeViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.youtube
}
}
footer: Item
......
......@@ -73,7 +73,6 @@
<file>widgets/SearchView/SearchTable.qml</file>
<file>widgets/SearchView/SearchSuggestions.qml</file>
<file>services/web/YouTube.qml</file>
<file>services/web/YouTube-A.qml</file>
<file>services/web/YoutubeViewer.qml</file>
<file>services/web/YoutubeViewer_A.qml</file>
</qresource>
......
import QtQuick 2.9
import QtWebView 1.1
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../view_models"
Page
{
property alias web : webView
WebView
{
id: webView
anchors.fill: parent
onLoadingChanged: {
if (loadRequest.errorString)
console.error(loadRequest.errorString);
}
}
}
......@@ -232,6 +232,7 @@ Page
text: ""
wrapMode: TextEdit.Wrap
onAccepted: runSearch(searchInput.text)
}
BabeButton
......@@ -240,6 +241,7 @@ Page
iconName: "edit-clear"
onClicked: searchInput.clear()
}
}
}
}
......
......@@ -8,7 +8,7 @@ BabePopup
{
id: videoPlayback
property alias webView: webView
maxHeight: 200
WebView
{
......
......@@ -17,6 +17,7 @@ ItemDelegate
property alias fontFamily: labelTxt.font.family
property string textColor: ListView.isCurrentItem ? highlightTextColor : foregroundColor
Rectangle
{
anchors.fill: parent
......@@ -26,7 +27,7 @@ ItemDelegate
ColumnLayout
{
anchors.fill: parent
anchors.fill: parent
Label
{
......
......@@ -17,6 +17,8 @@ BabeMenu
property string starReg : foregroundColor
property string starIcon: "draw-star"
signal trackRemoved(string url)
property alias menuItem : customItems.children
function queueIt(index)
......@@ -195,7 +197,8 @@ BabeMenu
text: "Remove"
onTriggered:
{
listModel.remove(list.currentIndex)
trackRemoved(list.model.get(list.currentIndex).url)
listModel.remove(list.currentIndex)
close()
}
}
......
......@@ -23,7 +23,6 @@ ToolBar
// signal playlistViewClicked()
signal searchViewClicked()
signal settingsViewClicked()
signal youtubeViewClicked()
width: parent.width
id: babeBar
......@@ -55,7 +54,7 @@ ToolBar
anchors.centerIn: parent
anchors.left: parent.left
iconName: "view-media-config"
iconName: "application-menu"
iconColor: settingsDrawer.visible ? babeColor : textColor/*(pageStack.wideMode || pageStack.currentIndex === 0 ) && !isMobile ? accentColor : textColor*/
onClicked: settingsViewClicked()
......@@ -195,30 +194,6 @@ ToolBar
}
}
Item
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.maximumWidth: toolBarIconSize*2
Layout.maximumHeight: toolBarIconSize
BabeButton
{
anchors.centerIn: parent
iconName: "im-youtube"
iconColor: accent && currentIndex === viewsIndex.youtube ? accentColor : textColor
onClicked: youtubeViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered && !isMobile
ToolTip.text: qsTr("YouTube")
}
}
Item
{
......
......@@ -148,18 +148,19 @@ Kirigami.PageRow
}
]
contextMenu.menuItem: [
BabeMenuItem
{
text: qsTr("Remove from playlist")
onTriggered:
{
bae.removePlaylistTrack(filterList.model.get(filterList.currentIndex).url, playlistViewModel.model.get(playlistViewModel.currentIndex).playlist)
populate(playlistQuery)
}
}
]
// contextMenu.menuItem: [
// BabeMenuItem
// {
// text: qsTr("Remove from playlist")
// onTriggered:
// {
// bae.removePlaylistTrack(filterList.model.get(filterList.currentIndex).url, playlistViewModel.model.get(playlistViewModel.currentIndex).playlist)
// populate(playlistQuery)
// }
// }
// ]
section.criteria: ViewSection.FullString
......@@ -184,6 +185,17 @@ Kirigami.PageRow
onAppendAll: appendAll(bae.get(playlistQuery))
onPulled: populate(playlistQuery)
}
Connections
{
target: filterList.contextMenu
onTrackRemoved:
{
bae.removePlaylistTrack(url, playlistViewModel.model.get(playlistViewModel.currentIndex).playlist)
populate(playlistQuery)
}
}
}
}
......
......@@ -163,6 +163,7 @@ Page
onAccepted: runSearch(searchInput.text)
// onActiveFocusChanged: if(activeFocus && autoSuggestions) suggestionsPopup.open()
onTextEdited: if(autoSuggestions) suggestionsPopup.updateSuggestions()
}
BabeButton
......
......@@ -3,6 +3,7 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import org.kde.kirigami 2.2 as Kirigami
import "../../utils/Help.js" as H
import "../../view_models"
Kirigami.GlobalDrawer
{
......@@ -50,13 +51,32 @@ Kirigami.GlobalDrawer
Kirigami.Action
{
text: qsTr("Collection"
)
text: qsTr("YouTube")
iconName: "im-youtube"
onTriggered:
{
pageStack.currentIndex = 1
currentView = viewsIndex.youtube
}
},
Kirigami.Action
{
text: qsTr("Folders")
iconName: "folder"
},
Kirigami.Action
{
text: qsTr("Collection")
iconName: "database-index"
Kirigami.Action
{
text: "Sources..."
text: qsTr("Sources...")
onTriggered: sourcesDialog.open()
iconName: "folder-new"
}
Kirigami.Action
......@@ -68,6 +88,7 @@ Kirigami.GlobalDrawer
Kirigami.Action
{
text: qsTr("Refresh...")
iconName: "view-refresh"
Kirigami.Action
{
......@@ -98,128 +119,136 @@ Kirigami.GlobalDrawer
{
text: qsTr("Clean")
onTriggered: bae.removeMissingTracks();
iconName: "edit-clear"
}
},
Kirigami.Action
{
text: "Brainz"
text: qsTr("Settings...")
iconName: "view-media-config"
Kirigami.Action
{
id: brainzToggle
text: checked ? "Turn OFF" : "Turn ON"
checked: activeBrainz
checkable: true
onToggled:
text: "Brainz"
Kirigami.Action
{
bae.saveSetting("BRAINZ", checked === true ? true : false, "BABE")
bae.brainz(checked === true ? true : false)
id: brainzToggle
text: checked ? "Turn OFF" : "Turn ON"
checked: activeBrainz
checkable: true
onToggled:
{
bae.saveSetting("BRAINZ", checked === true ? true : false, "BABE")
bae.brainz(checked === true ? true : false)
}
}
}
},
Kirigami.Action
{
text: "Appearance"
Kirigami.Action
{
text: "Icon size"
text: "Appearance"
Kirigami.Action
{
text: iconSizes.small
onTriggered :
text: "Icon size"
Kirigami.Action
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
text: iconSizes.small
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
}
}
}
Kirigami.Action
{
text: iconSizes.medium
onTriggered :
Kirigami.Action
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
text: iconSizes.medium
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
}
}
}
Kirigami.Action
{
text: iconSizes.big
onTriggered :
Kirigami.Action
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
text: iconSizes.big
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
iconSizeChanged(text)
}
}
}
}
// Kirigami.Action
// {
// text: "Theme"
// visible: isMobile
// Kirigami.Action
// {
// text: "Light"
// onTriggered : switchColorScheme("Light")
// }
// Kirigami.Action
// {
// text: "Dark"
// onTriggered : switchColorScheme("Dark")
// }
// Kirigami.Action
// {
// text: "Breeze"
// onTriggered : switchColorScheme("Breeze")
// }
// }
},
Kirigami.Action
{
text: "Player"
// Kirigami.Action
// {
// text: "Theme"
// visible: isMobile
// Kirigami.Action
// {
// text: "Light"
// onTriggered : switchColorScheme("Light")
// }
// Kirigami.Action
// {
// text: "Dark"
// onTriggered : switchColorScheme("Dark")
// }
// Kirigami.Action
// {
// text: "Breeze"
// onTriggered : switchColorScheme("Breeze")
// }
// }
}
Kirigami.Action
{
text: "Info label"
text: "Player"
Kirigami.Action
{
text: checked ? "ON" : "OFF"
checked: infoLabels
checkable: true
onToggled:
{
infoLabels = checked
bae.saveSetting("PLAYBACKINFO", infoLabels ? true : false, "BABE")
text: "Info label"
Kirigami.Action
{
text: checked ? "ON" : "OFF"
checked: infoLabels
checkable: true
onToggled:
{
infoLabels = checked
bae.saveSetting("PLAYBACKINFO", infoLabels ? true : false, "BABE")
}
}
}
}
Kirigami.Action
{
text: "Autoplay"
checked: autoplay
checkable: true
onToggled:
Kirigami.Action
{
autoplay = checked
bae.saveSetting("AUTOPLAY", autoplay ? true : false, "BABE")
}
text: "Autoplay"
checked: autoplay
checkable: true
onToggled:
{
autoplay = checked
bae.saveSetting("AUTOPLAY", autoplay ? true : false, "BABE")
}
}
}
},
Kirigami.Action
{
text: "Developer"
iconName: "code-context"
Kirigami.Action
{
......@@ -235,13 +264,31 @@ Kirigami.GlobalDrawer
Kirigami.Action
{
text: "About Babe"
},
text: "About..."
iconName: "help-about"
Kirigami.Action
{
text: "About Beats"
Kirigami.Action
{
text: "Beats"
}
Kirigami.Action
{
text: "Babe"
}
Kirigami.Action
{
text: "Pulpo"
}
Kirigami.Action
{
text: "Kirigami"
}
}
]
function switchColorScheme(variant)
......
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