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

0001 /*
0002  *   Copyright 2018 Camilo Higuita <milo.h@aol.com>
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 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.10
0021 import QtQuick.Controls 2.10
0022 
0023 import org.mauikit.controls 1.0 as Maui
0024 
0025 import QtGraphicalEffects 1.0
0026 
0027 /**
0028  * FloatingButton
0029  * A styled button to be used above other elements.
0030  *
0031  */
0032 ToolButton
0033 {
0034   id: control
0035   
0036   padding: Maui.Style.defaultPadding * 2
0037   
0038   icon.height: Maui.Style.iconSize
0039   icon.width: Maui.Style.iconSize
0040   
0041   icon.color: Maui.Theme.highlightedTextColor
0042   
0043   display: ToolButton.IconOnly
0044   
0045   background: Rectangle
0046   {
0047     id: _rec
0048     radius: Maui.Style.radiusV
0049     color: control.hovered || control.pressed ? Qt.lighter( Maui.Theme.highlightColor, 1.2) :   Maui.Theme.highlightColor
0050   }
0051   
0052   layer.enabled: true
0053   layer.effect: DropShadow
0054   {
0055     id: rectShadow
0056     cached: true
0057     horizontalOffset: 0
0058     verticalOffset: 0
0059     radius: 8.0
0060     samples: 16
0061     color:  "#80000000"
0062     smooth: true
0063   }
0064 }