Kirigami-addons

FloatingToolBar.qml
1// SPDX-FileCopyrightText: 2024 Mathis BrĂ¼chert <mbb@kaidan.im>
2// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
3// SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
4
5import QtQuick
6import org.kde.kirigami as Kirigami
7import QtQuick.Controls
8
9/**
10 * A floating toolbar to use for example in a canvas.
11 *
12 * The toolbar should be positioned with Kirigami.Units.largeSpacing from
13 * the border of the page.
14 *
15 * @code{qml}
16 * import org.kde.kirigamiaddons.components
17 * import org.kde.kirigami as Kirigami
18 *
19 * FloatingToolBar {
20 * contentItem: Kirigami.ActionToolBar {
21 * actions: [
22 * Kirigami.Action {
23 * ...
24 * }
25 * ]
26 * }
27 * }
28 * @endcode{}
29 *
30 * @image html floatingtoolbar.png
31 */
32ToolBar {
33 background: Kirigami.ShadowedRectangle {
34 color: Kirigami.Theme.backgroundColor
35 radius: Kirigami.Units.cornerRadius
36
37 shadow {
38 size: 15
39 yOffset: 3
40 color: Qt.rgba(0, 0, 0, 0.2)
41 }
42
43 border {
44 color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, Kirigami.Theme.frameContrast)
45 width: 1
46 }
47
48 Kirigami.Theme.inherit: false
49 Kirigami.Theme.colorSet: Kirigami.Theme.Window
50 }
51}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.