Kirigami2

TitlesPageHeader.qml
1 /*
2  * SPDX-FileCopyrightText: 2018 Marco Martin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.15
8 import QtQuick.Layouts 1.15
9 
10 AbstractPageHeader {
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 }
QTextStream & right(QTextStream &stream)
QTextStream & left(QTextStream &stream)
QTextStream & left(QTextStream &s)
QTextStream & right(QTextStream &s)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:01:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.