1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-05 10:12:46 +00:00

Added comments and general cleanup on qml files

This commit is contained in:
Chris Josten 2020-09-25 15:21:08 +02:00
parent 92a18c4fa5
commit 1eb6a8fb5d
17 changed files with 101 additions and 47 deletions

View file

@ -2,6 +2,9 @@ import QtQuick 2.6
import Sailfish.Silica 1.0
import QtGraphicalEffects 1.0
/**
* A silica-like background for displaying backdrops.
*/
Rectangle {
property alias source: backgroundImage.source
property alias sourceSize: backgroundImage.sourceSize
@ -10,7 +13,7 @@ Rectangle {
color: Theme.colorScheme == Theme.DarkOnLight ? "#fff" : "#000"
z: -1
opacity: status == Image.Ready ? 1.0 : 0.0
Behavior on opacity { NumberAnimation { duration: 300 } }
Behavior on opacity { FadeAnimator {} }
Image {
id: backgroundImage

View file

@ -1,6 +1,9 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
/**
* Delegate for displaying an item in the library.
*/
BackgroundItem {
id: root
property alias poster: posterImage.source

View file

@ -1,6 +1,9 @@
import QtQuick 2.6
import Sailfish.Silica 1.0
/**
* An image for "remote" images (loaded over e.g. http), with a spinner and a fallback image
*/
Image {
property string fallbackImage
property bool usingFallbackImage

View file

@ -6,7 +6,11 @@ import nl.netsoj.chris.Jellyfin 1.0
import "videoplayer"
Item {
/**
* A videoPlayer for Jellyfin videos
*/
SilicaItem {
id: playerRoot
property string itemId
property string title
@ -15,6 +19,17 @@ Item {
property MediaPlayer player
readonly property bool hudVisible: !hud.hidden
// Force a Light on Dark theme since I doubt that there are persons who are willing to watch a Video
// on a white background.
palette.colorScheme: Theme.LightOnDark
// Blackground to prevent the ambience from leaking through
Rectangle {
anchors.fill: parent
color: "black"
}
MediaSource {
id: mediaSource
apiClient: ApiClient

View file

@ -0,0 +1,5 @@
import QtQuick 2.0
Item {
}

View file

@ -0,0 +1,5 @@
import QtQuick 2.0
Item {
}

View file

@ -2,6 +2,10 @@ import QtQuick 2.6
import QtMultimedia 5.6
import Sailfish.Silica 1.0
/**
* The video "hud" or controls. This is the overlay displayed over a video player, which contains controls
* and playback information.
*/
Item {
id: videoHud
property MediaPlayer player