mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +00:00
Implemented collections + misc UI improvements
* There is a basic collection page, allowing the user to browse through collections. It has a sort function, that sort of works * Item cards now show a bar indicating play time * Item cards now have a black/white (depending on theme) shim, improving readability. * The resume watching section now actually loads items
This commit is contained in:
parent
5ea17070fe
commit
5d395ad7b6
15 changed files with 363 additions and 73 deletions
|
@ -11,6 +11,8 @@ BackgroundItem {
|
|||
property alias poster: posterImage.source
|
||||
property alias title: titleText.text
|
||||
property bool landscape: false
|
||||
property real progress: 0.0
|
||||
|
||||
width: Constants.libraryDelegateWidth
|
||||
height: landscape ? Constants.libraryDelegateHeight : Constants.libraryDelegatePosterHeight
|
||||
|
||||
|
@ -32,17 +34,14 @@ BackgroundItem {
|
|||
visible: root.highlighted
|
||||
}*/
|
||||
|
||||
Rectangle {
|
||||
Shim {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: titleText.height * 1.5 + Theme.paddingSmall * 2
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "transparent"; }
|
||||
GradientStop { position: 1.0; color: Theme.highlightDimmerColor }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -58,4 +57,15 @@ BackgroundItem {
|
|||
truncationMode: TruncationMode.Fade
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: progress
|
||||
anchors {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: Theme.paddingSmall
|
||||
color: Theme.highlightColor
|
||||
width: root.progress * parent.width
|
||||
}
|
||||
}
|
||||
|
|
12
qml/components/Shim.qml
Normal file
12
qml/components/Shim.qml
Normal file
|
@ -0,0 +1,12 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
Rectangle {
|
||||
property real shimOpacity: 1.0
|
||||
property color shimColor: Theme.overlayBackgroundColor
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: Theme.rgba(shimColor, 0.0); }
|
||||
GradientStop { position: 1.0; color: Theme.rgba(shimColor, shimOpacity); }
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick 2.6
|
||||
|
||||
Item {
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ Column {
|
|||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: Constants.libraryDelegateWidth
|
||||
|
@ -35,6 +34,31 @@ Column {
|
|||
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": height})
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
clip: true
|
||||
|
||||
// Makes the progress bar stand out more
|
||||
Shim {
|
||||
anchors {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
height: parent.height / 3
|
||||
shimColor: Theme.overlayBackgroundColor
|
||||
shimOpacity: Theme.opacityOverlay
|
||||
//width: model.userData.PlayedPercentage * parent.width / 100
|
||||
visible: episodeProgress.width > 0 // It doesn't look nice when it's visible on every image
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: episodeProgress
|
||||
anchors {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: Theme.paddingMedium
|
||||
width: model.userData.PlayedPercentage * parent.width / 100
|
||||
color: Theme.highlightColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue