Kirigami2

controls/AbstractApplicationHeader.qml
1 /*
2  * SPDX-FileCopyrightText: 2016 Marco Martin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.5
8 import org.kde.kirigami 2.5 as Kirigami
9 import "private" as P
10 import "templates" as T
11 
12 
13 //TODO KF6: remove
14 /**
15  * @brief An item that can be used as a title for the application.
16  *
17  * Scrolling the main page will make it taller or shorter (through the point of going away)
18  * It's a behavior similar to the typical mobile web browser addressbar
19  * the minimum, preferred and maximum heights of the item can be controlled with
20  * * ``minimumHeight``: default is 0, i.e. hidden
21  * * ``preferredHeight``: default is Kirigami.Units.gridUnit * 1.6
22  * * ``maximumHeight``: default is Kirigami.Units.gridUnit * 3
23  *
24  * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
25  *
26  * @deprecated This will be deleted in KF6.
27  * @inherit kirigami::templates::AbstractApplicationHeader
28  */
29 T.AbstractApplicationHeader {
30  id: root
31 
32  Kirigami.Theme.inherit: false
33  Kirigami.Theme.colorSet: Kirigami.Theme.Header
34 
35  background: Rectangle {
36  color: Kirigami.Theme.backgroundColor
37  P.EdgeShadow {
38  id: shadow
39  visible: root.separatorVisible
40  anchors {
41  right: parent.right
42  left: parent.left
43  top: parent.bottom
44  }
45  edge: Qt.TopEdge
46  opacity: (!root.page.header || root.page.header.toString().indexOf("ToolBar") === -1)
47  Behavior on opacity {
48  OpacityAnimator {
49  duration: Kirigami.Units.longDuration
50  easing.type: Easing.InOutQuad
51  }
52  }
53  }
54  Behavior on opacity {
55  OpacityAnimator {
56  duration: Kirigami.Units.longDuration
57  easing.type: Easing.InOutQuad
58  }
59  }
60  }
61 }
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 Nov 30 2023 04:01:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.