mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-01 08:52:45 +00:00
Added very simple photo viewer
This commit is contained in:
parent
d6a1f431b4
commit
e838fcc8a1
6 changed files with 46 additions and 5 deletions
|
@ -86,6 +86,8 @@ function getPageUrl(mediaType, itemType) {
|
|||
return Qt.resolvedUrl("pages/itemdetails/CollectionPage.qml")
|
||||
case "video":
|
||||
return Qt.resolvedUrl("pages/itemdetails/VideoPage.qml")
|
||||
case "photo":
|
||||
return Qt.resolvedUrl("pages/itemdetails/PhotoPage.qml")
|
||||
default:
|
||||
return Qt.resolvedUrl("pages/itemdetails/UnsupportedPage.qml")
|
||||
}
|
||||
|
|
|
@ -41,14 +41,10 @@ SilicaItem {
|
|||
property alias subtitleTrack: mediaSource.subtitleIndex
|
||||
property real startTicks: 0
|
||||
|
||||
// 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"
|
||||
color: Theme.overlayBackgroundColor
|
||||
}
|
||||
|
||||
PlaybackManager {
|
||||
|
|
35
sailfish/qml/pages/itemdetails/PhotoPage.qml
Normal file
35
sailfish/qml/pages/itemdetails/PhotoPage.qml
Normal file
|
@ -0,0 +1,35 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import nl.netsoj.chris.Jellyfin 1.0
|
||||
|
||||
BaseDetailPage {
|
||||
id: pageRoot
|
||||
navigationStyle: PageNavigation.Vertical
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Theme.overlayBackgroundColor
|
||||
}
|
||||
|
||||
PageHeader {
|
||||
title: itemData.name
|
||||
titleColor: Theme.primaryColor
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image
|
||||
source: ApiClient.downloadUrl(itemId)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.fill: parent
|
||||
|
||||
opacity: status == Image.Ready ? 1.0 : 0.0
|
||||
Behavior on opacity { FadeAnimator {}}
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
running: image.status == Image.Loading
|
||||
size: BusyIndicatorSize.Large
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue