Files
Jellyfin-Freebox/app/Components/Page.qml
T
stilobique b1ca2a7cff
CI / Release Gitea (push) Successful in 32s
CI / Vérifications et paquet (push) Successful in 47s
Refactoring: move all apps inside a sub folder
2026-11-08 14:28:28 +01:00

74 lines
1.9 KiB
QML

import QtQuick 2.5
import "../Shared"
// Base de chaque écran : en-tête (titre + sous-titre) et zone de contenu.
// `navigator` et `session` sont injectés par le Navigator au chargement.
FocusScope {
id: page
property var navigator: null
property var session: null
// Élément qui reçoit le focus quand l'écran s'affiche.
property Item initialFocus: null
// true : masque le panneau du logo (écrans du catalogue).
property bool fullscreen: false
// Image de fond facultative (assombrie).
property alias backdrop: backdropImage.source
property alias title: titleText.text
property alias subtitle: subtitleText.text
default property alias content: body.data
Image {
id: backdropImage
anchors.fill: parent
visible: status === Image.Ready
fillMode: Image.PreserveAspectCrop
asynchronous: true
opacity: 0.25
}
Column {
id: header
anchors {
top: parent.top
left: parent.left
right: parent.right
margins: Theme.pageMargin
}
spacing: Theme.spacingS
Text {
id: titleText
width: parent.width
color: Theme.text
font.pixelSize: Theme.fontTitle
font.bold: true
elide: Text.ElideRight
}
Text {
id: subtitleText
width: parent.width
visible: text !== ""
color: Theme.textMuted
font.pixelSize: Theme.fontBody
wrapMode: Text.WordWrap
}
}
Item {
id: body
anchors {
top: header.bottom
topMargin: Theme.spacingXL
left: parent.left
right: parent.right
bottom: parent.bottom
leftMargin: Theme.pageMargin
rightMargin: Theme.pageMargin
bottomMargin: Theme.pageMargin
}
}
}