Warning, /maui/mauikit/src/controls.6/Separator.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
0003  *  SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <aleixpol@kde.org>
0004  *
0005  *  SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 import QtQuick
0009 import org.mauikit.controls 1.3 as Maui
0010 
0011 /**
0012  * @inherit QtQuick.Rectangle
0013  * @brief A visual separator.
0014  *
0015  * Useful as a visual hint for diciding grouped elements.
0016  *
0017  * @inherit QtQuick.Rectangle
0018  */
0019 Rectangle
0020 {
0021     id: root
0022     implicitHeight: 1
0023     implicitWidth: 1
0024     Accessible.role: Accessible.Separator
0025 
0026     /**
0027      * @brief Types of weight.
0028      */
0029     enum Weight {
0030         Light,
0031         Normal
0032     }
0033 
0034     /**
0035      * @brief This property holds the visual weight of the separator.
0036      * 
0037      * Weight values:
0038      * * `Separator.Weight.Light`
0039      * * `Separator.Weight.Normal`
0040      * 
0041      * The default is `Separator.Weight.Normal`
0042      */
0043     property int weight: Separator.Weight.Normal
0044 
0045     /* TODO: If we get a separator color role, change this to
0046      * mix weights lower than Normal with the background color
0047      * and mix weights higher than Normal with the text color.
0048      */
0049     color: Maui.ColorUtils.linearInterpolation(Maui.Theme.backgroundColor, Maui.Theme.textColor, weight == Separator.Weight.Light ? 0.07 : 0.15);
0050     
0051     Behavior on color
0052     {
0053         Maui.ColorTransition{}
0054     }    
0055 }
0056