Kirigami2

controls/AbstractApplicationHeader.qml
1/*
2 * SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7import QtQuick
8import org.kde.kirigami as Kirigami
9import "private" as P
10import "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 * @inherit org::kde::kirigami::templates::AbstractApplicationHeader
27 */
28T.AbstractApplicationHeader {
29 id: root
30
31 Kirigami.Theme.inherit: false
32 Kirigami.Theme.colorSet: Kirigami.Theme.Header
33
34 background: Rectangle {
35 color: Kirigami.Theme.backgroundColor
36 P.EdgeShadow {
37 id: shadow
38 visible: root.separatorVisible
39 anchors {
40 right: parent.right
41 left: parent.left
42 top: parent.bottom
43 }
44 edge: Qt.TopEdge
45 opacity: (!root.page || !root.page.header || root.page.header.toString().indexOf("ToolBar") === -1)
46 Behavior on opacity {
47 OpacityAnimator {
48 duration: Kirigami.Units.longDuration
49 easing.type: Easing.InOutQuad
50 }
51 }
52 }
53 Behavior on opacity {
54 OpacityAnimator {
55 duration: Kirigami.Units.longDuration
56 easing.type: Easing.InOutQuad
57 }
58 }
59 }
60}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:52:23 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.