Kirigami2

styles/org.kde.desktop/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.4 as Kirigami
9 import "../../templates" as T
10 
11 /**
12  * An item that can be used as a title for the application.
13  * Scrolling the main page will make it taller or shorter (through the point of going away)
14  * It's a behavior similar to the typical mobile web browser addressbar
15  * the minimum, preferred and maximum heights of the item can be controlled with
16  * * minimumHeight: default is 0, i.e. hidden
17  * * preferredHeight: default is Kirigami.Units.gridUnit * 1.6
18  * * maximumHeight: default is Kirigami.Units.gridUnit * 3
19  *
20  * To achieve a titlebar that stays completely fixed just set the 3 sizes as the same
21  */
22 T.AbstractApplicationHeader {
23  id: root
24 
25  // Always use header bg color for toolbar (if available), even if the page
26  // it's located on uses a different color set
27  Kirigami.Theme.inherit: false
28  Kirigami.Theme.colorSet: Kirigami.Theme.Header
29 
30  background: Rectangle {
31  color: Kirigami.Theme.backgroundColor
32  Kirigami.Separator {
33  visible: root.separatorVisible && (!root.page || !root.page.header || !root.page.header.visible || root.page.header.toString().indexOf("ToolBar") === -1)
34  anchors {
35  left: parent.left
36  right: parent.right
37  bottom: root.y <= 0 ? parent.bottom : undefined
38  top: root.y <= 0 ? undefined : parent.top
39  }
40  }
41  }
42 }
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 Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.