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 property alias title: titleText.text property alias subtitle: subtitleText.text default property alias content: body.data 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 } } }