Kirigami2

Separator.qml
1 /*
2  * SPDX-FileCopyrightText: 2012 Marco Martin <[email protected]>
3  * SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <[email protected]>
4  *
5  * SPDX-License-Identifier: LGPL-2.0-or-later
6  */
7 
8 import QtQuick 2.1
9 import org.kde.kirigami 2.12 as Kirigami
10 
11 /**
12  * @brief A visual separator.
13  *
14  * Useful for splitting one set of items from another.
15  *
16  * @inherit QtQuick.Rectangle
17  */
18 Rectangle {
19  id: root
20  implicitHeight: 1
21  implicitWidth: 1
22  Accessible.role: Accessible.Separator
23 
24  enum Weight {
25  Light,
26  Normal
27  }
28 
29  /**
30  * @brief This property holds the visual weight of the separator.
31  *
32  * Weight options:
33  * * ``Kirigami.Separator.Weight.Light``
34  * * ``Kirigami.Separator.Weight.Normal``
35  *
36  * default: ``Separator.Weight.Normal``
37  *
38  * @since 5.72
39  * @since org.kde.kirigami 2.12
40  */
41  property int weight: Separator.Weight.Normal
42 
43  /* TODO: If we get a separator color role, change this to
44  * mix weights lower than Normal with the background color
45  * and mix weights higher than Normal with the text color.
46  */
47  color: Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, weight === Separator.Weight.Light ? 0.07 : 0.15)
48 }
A visual separator.
Definition: Separator.qml:17
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.