Kirigami2

ToolBarPageFooter.qml
1/*
2 * SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7import QtQuick
8import QtQuick.Controls as QQC2
9import org.kde.kirigami as Kirigami
10
11QQC2.ToolBar {
12 id: root
13 position: QQC2.ToolBar.Footer
14
15 NumberAnimation {
16 id: appearAnim
17 target: root
18 property: "height"
19 duration: Kirigami.Units.longDuration
20 easing.type: Easing.InOutQuad
21 }
22
23 Connections {
24 target: applicationWindow()
25 function onControlsVisibleChanged() {
26 if (applicationWindow().controlsVisible) {
27 appearAnim.from = 0;
28 appearAnim.to = root.implicitHeight;
29 } else {
30 appearAnim.from = root.implicitHeight;
31 appearAnim.to = 0;
32 }
33 appearAnim.restart();
34 }
35 }
36
37 contentItem: Kirigami.ActionToolBar {
38 display: QQC2.Button.TextUnderIcon
39 alignment: Qt.AlignCenter
40 actions: root.parent.page.actions
41 }
42}
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.