MauiKit Controls

CloseButton.qml
1import QtQuick
2import QtQuick.Controls
3
4import org.mauikit.controls as Maui
5
6/**
7 * @inherit QtQuick.Controls.ToolButton
8 * @brief The standard control for presenting a close button.
9 *
10 * <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-toolbutton.html">This controls inherits from QQC2 ToolButton, to checkout its inherited properties refer to the Qt Docs.</a>
11 *
12 * This control is used to display a close button that is cohesive and uniform across all the different UI elements.
13 * Consider using this component if your own custom control needs a close button.
14 *
15 * The close button presents to the user a clickable element which represents the intention to exit, quit, close or dismiss an action or visible item.
16 *
17 * It is used, for example, in the TabViewButton to close tabs, in the Chip element to dismiss it, and in some of the dialog.
18 */
19ToolButton
20{
21 id: control
22
23 icon.source: "qrc:/assets/close.svg"
24 icon.color: control.hovered || control.containsPress ? control.Maui.Theme.negativeTextColor : control.Maui.Theme.textColor
25
26 background: Rectangle
27 {
28 radius: Maui.Style.radiusV
29 color: control.hovered || control.containsPress ? Maui.Theme.negativeBackgroundColor : "transparent"
30 }
31}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:48:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.