Warning, /maui/mauikit/src/controls.5/private/EdgeShadow.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2016 Marco Martin <mart@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or modify 0005 * it under the terms of the GNU Library General Public License as 0006 * published by the Free Software Foundation; either version 2, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU Library General Public License for more details 0013 * 0014 * You should have received a copy of the GNU Library General Public 0015 * License along with this program; if not, write to the 0016 * Free Software Foundation, Inc., 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 import QtQuick 2.15 0021 import QtGraphicalEffects 1.0 0022 import org.mauikit.controls 1.3 as Maui 0023 0024 LinearGradient 0025 { 0026 id: control 0027 /** 0028 * edge: enumeration 0029 * This property holds the edge of the shadow that will determine 0030 * the direction of the gradient. 0031 * The acceptable values are: 0032 * Qt.TopEdge: The top edge of the content item. 0033 * Qt.LeftEdge: The left edge of the content item (default). 0034 * Qt.RightEdge: The right edge of the content item. 0035 * Qt.BottomEdge: The bottom edge of the content item. 0036 */ 0037 property int edge: Qt.LeftEdge 0038 0039 /** 0040 * 0041 */ 0042 property color color: Maui.ColorUtils.linearInterpolation(Maui.Theme.alternateBackgroundColor, Maui.Theme.textColor, 0.2) 0043 0044 implicitWidth: Maui.Style.units.gridUnit*3 0045 0046 opacity: 0.4 0047 start: Qt.point(0, height/2) 0048 end: Qt.point( width, height/2) 0049 0050 0051 transform: [ 0052 Scale{ xScale: control.edge === Qt.RightEdge ? -1 : 1 }, 0053 Translate {x: control.edge === Qt.RightEdge ? control.width : 0} 0054 ] 0055 0056 gradient: Gradient 0057 { 0058 GradientStop 0059 { 0060 position: 0 0061 color: control.color 0062 } 0063 0064 GradientStop 0065 { 0066 position: 0.8 0067 color: "transparent" 0068 } 0069 0070 GradientStop 0071 { 0072 position: 1 0073 color: "transparent" 0074 } 0075 } 0076 } 0077