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

0001 /*
0002  * Copyright 2017 Marco Martin <mart@kde.org>
0003  * Copyright 2017 The Qt Company Ltd.
0004  *
0005  * GNU Lesser General Public License Usage
0006  * Alternatively, this file may be used under the terms of the GNU Lesser
0007  * General Public License version 3 as published by the Free Software
0008  * Foundation and appearing in the file LICENSE.LGPLv3 included in the
0009  * packaging of this file. Please review the following information to
0010  * ensure the GNU Lesser General Public License version 3 requirements
0011  * will be met: https://www.gnu.org/licenses/lgpl.html.
0012  *
0013  * GNU General Public License Usage
0014  * Alternatively, this file may be used under the terms of the GNU
0015  * General Public License version 2.0 or later as published by the Free
0016  * Software Foundation and appearing in the file LICENSE.GPL included in
0017  * the packaging of this file. Please review the following information to
0018  * ensure the GNU General Public License version 2.0 requirements will be
0019  * met: http://www.gnu.org/licenses/gpl-2.0.html.
0020  */
0021 
0022 
0023 import QtQuick 2.6
0024 import QtGraphicalEffects 1.0
0025 import QtQuick.Templates 2.3 as T
0026 import org.mauikit.controls 1.3 as Maui
0027 
0028 T.ToolTip {
0029     id: controlRoot
0030 
0031     Maui.Theme.colorSet: Maui.Theme.Tooltip
0032     Maui.Theme.inherit: false
0033 
0034     x: parent ? (parent.width - implicitWidth) / 2 : 0
0035     y: -implicitHeight - 3
0036 
0037     implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
0038     implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
0039 
0040     margins: 6
0041     padding: 6
0042 
0043     closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
0044 
0045     contentItem: Label {
0046         text: controlRoot.text
0047         font: controlRoot.font
0048         Maui.Theme.colorSet: Maui.Theme.Tooltip
0049         color: Maui.Theme.textColor
0050     }
0051 
0052 
0053     background: Rectangle {
0054         radius: 3
0055         opacity: 0.95
0056         color: Maui.Theme.backgroundColor
0057         Maui.Theme.colorSet: Maui.Theme.Tooltip
0058         layer.enabled: true
0059         layer.effect: DropShadow {
0060             transparentBorder: true
0061             radius: 4
0062             samples: 8
0063             horizontalOffset: 0
0064             verticalOffset: 2
0065             color: Qt.rgba(0, 0, 0, 0.3)
0066         }
0067     }
0068 
0069 }