Commit ea5a4a28 authored by Camilo Higuita's avatar Camilo Higuita

diable webengine on plasma mobile until upstream solves issues

parent c798a6b7
......@@ -12,7 +12,17 @@ SOURCES += \
DISTFILES += \
$$PWD/src/SendIntent.java \
$$PWD/src/NotificationClient.java \
$$PWD/src/MyService.java
$$PWD/src/MyService.java \
$$PWD/AndroidManifest.xml \
$$PWD/gradlew \
$$PWD/build.gradle \
$$PWD/gradlew.bat \
$$PWD/gradle.properties \
$$PWD/local.properties \
$$PWD/gradle/wrapper/gradle-wrapper.jar \
$$PWD/gradlew \
$$PWD/res/values/libs.xml \
$$PWD/gradle/wrapper/gradle-wrapper.properties
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/
......
assets/heart_indicator.gif

41.7 KB | W: | H:

assets/heart_indicator.gif

12.9 KB | W: | H:

assets/heart_indicator.gif
assets/heart_indicator.gif
assets/heart_indicator.gif
assets/heart_indicator.gif
  • 2-up
  • Swipe
  • Onion skin
assets/heart_indicator_white.gif

12 KB | W: | H:

assets/heart_indicator_white.gif

12.5 KB | W: | H:

assets/heart_indicator_white.gif
assets/heart_indicator_white.gif
assets/heart_indicator_white.gif
assets/heart_indicator_white.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -90,12 +90,12 @@ int main(int argc, char *argv[])
context->setContextProperty("link", &bae.link);
qmlRegisterUncreatableMetaObject(
LINK::staticMetaObject, // static meta object
"Link.Codes", // import statement (can be any string)
1, 0, // major and minor version of the import
"LINK", // name in QML (does not have to match C++ name)
"Error: only enums" // error in case someone tries to create a MyNamespace object
);
LINK::staticMetaObject, // static meta object
"Link.Codes", // import statement (can be any string)
1, 0, // major and minor version of the import
"LINK", // name in QML (does not have to match C++ name)
"Error: only enums" // error in case someone tries to create a MyNamespace object
);
#ifdef STATIC_KIRIGAMI
KirigamiPlugin::getInstance().registerTypes();
#endif
......@@ -104,10 +104,11 @@ int main(int argc, char *argv[])
QIcon::setThemeName("Luv");
QtWebView::initialize();
#else
// if(QQuickStyle::availableStyles().contains("nomad"))
// QQuickStyle::setStyle("nomad");
// if(QQuickStyle::availableStyles().contains("nomad"))
// QQuickStyle::setStyle("nomad");
QtWebEngine::initialize();
if(!BAE::isMobile())
QtWebEngine::initialize();
#endif
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
......
This diff is collapsed.
......@@ -80,5 +80,8 @@
<file>services/local/LinkingListModel.qml</file>
<file>assets/vvave.notifyrc</file>
<file>assets/vvave.png</file>
<file>widgets/MainPlaylist/AlbumsRoll.qml</file>
<file>assets/heart_indicator.gif</file>
<file>assets/heart_indicator_white.gif</file>
</qresource>
</RCC>
......@@ -29,7 +29,7 @@ function playTrack(track)
bae.notifySong(currentTrack.url)
}
bae.trackLyrics(currentTrack.url)
// bae.trackLyrics(currentTrack.url)
// root.mainPlaylist.infoView.wikiAlbum = bae.albumWiki(root.mainPlaylist.currentTrack.album,root.mainPlaylist.currentTrack.artist)
// root.mainPlaylist.infoView.wikiArtist = bae.artistWiki(root.mainPlaylist.currentTrack.artist)
......@@ -120,6 +120,7 @@ function playAt(index)
{
currentTrackIndex = index
mainPlaylist.list.currentIndex = index
mainPlaylist.albumsRoll.positionAlbum(currentTrackIndex)
playTrack(mainPlaylist.list.model.get(index))
}
}
......@@ -130,6 +131,7 @@ function quickPlay(track)
appendTrack(track)
playAt(root.mainPlaylist.list.count-1)
mainPlaylist.list.positionViewAtEnd()
mainPlaylist.albumsRoll.positionViewAtEnd()
}
......@@ -137,7 +139,10 @@ function appendTracksAt(tracks, at)
{
if(tracks)
for(var i in tracks)
{
mainPlaylist.albumsRoll.model.insert(parseInt(at)+parseInt(i)+1, tracks[i])
mainPlaylist.list.model.insert(parseInt(at)+parseInt(i), tracks[i])
}
}
function appendTrack(track)
......@@ -145,6 +150,7 @@ function appendTrack(track)
if(track)
{
mainPlaylist.list.model.append(track)
mainPlaylist.albumsRoll.append(track)
animFooter.running = true
if(sync === true)
{
......@@ -229,6 +235,7 @@ function playAll(tracks)
infoMsg = ""
mainPlaylist.table.clearTable()
mainPlaylist.albumsRoll.model.clear()
pageStack.currentIndex = 0
for(var i in tracks)
......
......@@ -9,11 +9,13 @@ ItemDelegate
id: babeAlbumRoot
property int albumSize : iconSizes.huge
property int borderRadius : albumSize*0.05
property int albumRadius : 0
property bool albumCard : true
property string fillColor: backgroundColor
property string fillColor : "#80000000"
property bool hide : false
property bool showLabels : true
property bool showIndicator : false
property bool isCurrentListItem : ListView.isCurrentItem
property color labelColor : GridView.isCurrentItem || hovered || down ? highlightColor : textColor
// height: typeof album === 'undefined' ? parseInt(albumSize+(albumSize*0.3)) : parseInt(albumSize+(albumSize*0.4))
......@@ -27,32 +29,6 @@ ItemDelegate
color: "transparent"
}
DropShadow
{
anchors.fill: card
visible: card.visible
horizontalOffset: 0
verticalOffset: 3
radius: 8.0
samples: 17
color: "#80000000"
source: card
}
Rectangle
{
id: card
visible: albumCard
width: albumSize
height:albumSize
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
color: fillColor
radius: borderRadius
}
ColumnLayout
{
anchors.fill: parent
......@@ -66,6 +42,31 @@ ItemDelegate
Layout.maximumHeight: albumSize
Layout.minimumHeight: albumSize
DropShadow
{
anchors.fill: card
visible: card.visible
horizontalOffset: 0
verticalOffset: 3
radius: 8.0
samples: 17
color: "#80000000"
source: card
}
Rectangle
{
id: card
z: -999
visible: albumCard
anchors.centerIn: img
anchors.fill: img
color: fillColor
opacity: 0.5
radius: albumRadius
}
Image
{
id: img
......@@ -79,7 +80,9 @@ ItemDelegate
fillMode: Image.PreserveAspectFit
cache: true
// antialiasing: true
antialiasing: true
smooth: true
asynchronous: true
source:
{
......@@ -105,10 +108,35 @@ ItemDelegate
}
}
}
Rectangle
{
visible : showIndicator && isCurrentListItem
height: parent.height * 0.1
width: parent.width * 0.1
anchors.bottom: parent.bottom
anchors.bottomMargin: space.big
anchors.horizontalCenter:parent.horizontalCenter
radius: Math.min(width, height)
color: "#f84172"
AnimatedImage
{
source: "qrc:/assets/heart_indicator_white.gif"
anchors.centerIn: parent
height: parent.height * 0.6
width: parent.width * 0.6
playing: parent.visible
}
}
}
Item
{
visible: showLabels
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
......@@ -163,7 +191,7 @@ ItemDelegate
}
}
}
}
}
......
import QtQuick.Controls 2.2
import QtQuick 2.9
import ".."
import org.kde.kirigami 2.0 as Kirigami
Pane
{
......@@ -13,7 +14,7 @@ Pane
property int albumCoverSize: iconSizes.enormous
readonly property int albumSpacing: albumCoverSize * 0.3 + space.small
property int albumCoverRadius : albumCoverSize*0.05
property int albumCoverRadius : Kirigami.Units.devicePixelRatio * 6
property bool albumCardVisible : true
property alias gridModel: gridModel
property alias grid: grid
......@@ -59,7 +60,7 @@ Pane
height: parent.height
cellWidth: albumCoverSize + albumSpacing
cellHeight: albumCoverSize + albumSpacing
cellHeight: albumCoverSize + albumSpacing*2
focus: true
boundsBehavior: Flickable.StopAtBounds
......
......@@ -85,7 +85,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
DISTFILES += \
db/script.sql \
db/script.sql
HEADERS += \
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick 2.9
import "../../view_models/BabeGrid"
import org.kde.kirigami 2.0 as Kirigami
import "../../utils/Player.js" as Player
Item {
ListView
{
id: albumsRollRoot
orientation: ListView.Horizontal
clip: true
spacing: space.huge
focus: true
interactive: true
currentIndex: currentTrackIndex
highlightFollowsCurrentItem: true
highlightMoveDuration: 0
// snapMode: ListView.SnapToItem
model : ListModel{}
delegate: BabeAlbum
{
id: delegate
height: coverSize
width: coverSize
albumSize : coverSize
albumRadius : 0
showLabels: false
showIndicator: true
anchors.verticalCenter: parent.verticalCenter
Connections
{
target: delegate
onClicked:
{
albumsRollRoot.currentIndex = index
play(index)
}
}
}
function append(album)
{
model.insert(count, album)
}
function positionAlbum(index)
{
positionViewAtIndex(index, ListView.Center)
}
}
......@@ -19,6 +19,7 @@ Item
id: mainPlaylistRoot
property alias artwork : artwork
property alias albumsRoll : albumsRoll
property alias cover : cover
property alias list : table.list
property alias table: table
......@@ -74,32 +75,30 @@ Item
anchors.fill: parent
color: darkDarkColor
z: -999
}
FastBlur
{
visible: cover.visible
width: mainPlaylistRoot.width
height: mainPlaylistItem.y
source: artwork
radius: 100
transparentBorder: false
cached: true
}
Image
{
id: artwork
visible: cover.visible
anchors.fill: parent
Image
{
id: artwork
visible: cover.visible
width: parent.height < coverSize ? parent.height : coverSize
height: parent.height
//// sourceSize.height: coverSize
//// sourceSize.width: coverSize
sourceSize.height: coverSize
sourceSize.width: coverSize
// anchors.centerIn: parent
source: currentArtwork ? "file://"+encodeURIComponent(currentArtwork) : "qrc:/assets/cover.png"
fillMode: Image.PreserveAspectCrop
}
anchors.centerIn: parent
source: currentArtwork ? "file://"+encodeURIComponent(currentArtwork) : "qrc:/assets/cover.png"
fillMode: Image.PreserveAspectFit
FastBlur
{
visible: cover.visible
anchors.fill: parent
source: artwork
radius: 100
transparentBorder: false
cached: true
}
MouseArea
{
......@@ -115,12 +114,27 @@ Item
}
}
}
Item
{
anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter
AlbumsRoll
{
id: albumsRoll
height: parent.height
width: parent.width
anchors.verticalCenter: parent.vertical
}
}
}
ToolBar
{
id: mainlistContext
width: parent.width
visible : !focusMode
Layout.row: 2
Layout.column: 1
......@@ -232,6 +246,8 @@ Item
Item
{
id: mainPlaylistItem
visible : !focusMode
Layout.row: 4
Layout.column: 1
Layout.fillWidth: true
......@@ -308,22 +324,9 @@ Item
color: darkDarkColor
}
onRowClicked:
{
prevTrackIndex = currentTrackIndex
Player.playAt(index)
}
onArtworkDoubleClicked:
{
contextMenu.babeIt(index)
// var query = Q.GET.albumTracks_.arg(model.get(index).album)
// query = query.arg(model.get(index).artist)
// Player.playAll(bae.get(query))
// Player.appendTracksAt(bae.get(query),index)
onRowClicked: play(index)
}
onArtworkDoubleClicked: contextMenu.babeIt(index)
Component.onCompleted:
{
......@@ -369,34 +372,52 @@ Item
}
}
function gomini()
function goFocusMode()
{
if(!isMobile)
if(focusMode)
{
if(root.header.visible)
if(isMobile)
{
root.maximumWidth = columnWidth
root.minimumWidth = columnWidth
root.maximumHeight = mainPlaylistItem.y + footer.height
root.minimumHeight = mainPlaylistItem.y + footer.height
root.header.visible = false
// root.footer.visible = false
// mainlistContext.visible = false
root.width = screenWidth
root.height= screenHeight
}else
{
cover.y = 0
root.maximumWidth = bae.screenGeometry("width")
root.maximumWidth = screenWidth
root.minimumWidth = columnWidth
root.maximumHeight = bae.screenGeometry("height")
root.maximumHeight = screenHeight
root.minimumHeight = columnWidth
root.width = columnWidth
root.height = 700
root.header.visible = true
// root.footer.visible = true
// mainlistContext.visible = true
}
}else
{
if(isMobile)
{
}else
{
root.maximumWidth = columnWidth
root.minimumWidth = columnWidth
root.maximumHeight = columnWidth
root.minimumHeight = columnWidth
// root.footer.visible = false
// mainlistContext.visible = false
}
}
focusMode = !focusMode
}
function play(index)
{
prevTrackIndex = currentTrackIndex
Player.playAt(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