Kirigami2

TitlesPageHeader.qml
1/*
2 * SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7import QtQuick
8import QtQuick.Layouts
9
10AbstractPageHeader {
11 id: root
12
13 Loader {
14 id: titleLoader
15
16 anchors {
17 verticalCenter: parent.verticalCenter
18 left: parent.left
19 right: parent.right
20 }
21 height: Math.min(root.height, item
22 ? (item.Layout.preferredHeight > 0 ? item.Layout.preferredHeight : item.implicitHeight)
23 : 0)
24
25 // Don't load async to prevent jumpy behaviour on slower devices as it loads in.
26 // If the title delegate really needs to load async, it should be its responsibility to do it itself.
27 asynchronous: false
28 sourceComponent: page ? page.titleDelegate : null
29 }
30}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.