Warning, /maui/mauikit/src/controls.6/CloseButton.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick
0002 import QtQuick.Controls
0003
0004 import org.mauikit.controls 1.3 as Maui
0005
0006 /**
0007 * @inherit QtQuick.Controls.ToolButton
0008 * @brief The standard control for presenting a close button.
0009 *
0010 * <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>
0011 *
0012 * This control is used to display a close button that is cohesive and uniform across all the different UI elements.
0013 * Consider using this component if your own custom control needs a close button.
0014 *
0015 * 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.
0016 *
0017 * It is used, for example, in the TabViewButton to close tabs, in the Chip element to dismiss it, and in some of the dialog.
0018 */
0019 ToolButton
0020 {
0021 id: control
0022
0023 icon.source: "qrc:/assets/close.svg"
0024 icon.color: control.hovered || control.containsPress ? control.Maui.Theme.negativeTextColor : control.Maui.Theme.textColor
0025
0026 background: Rectangle
0027 {
0028 radius: Maui.Style.radiusV
0029 color: control.hovered || control.containsPress ? Maui.Theme.negativeBackgroundColor : "transparent"
0030 }
0031 }