Warning, /maui/nomad-style/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.Controls 2.3 as Controls 0026 import QtQuick.Templates 2.3 as T 0027 import org.kde.kirigami 2.2 as Kirigami 0028 0029 T.ToolTip { 0030 id: controlRoot 0031 0032 Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip 0033 Kirigami.Theme.inherit: false 0034 0035 x: parent ? (parent.width - implicitWidth) / 2 : 0 0036 y: -implicitHeight - 3 0037 0038 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding 0039 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding 0040 0041 margins: 6 0042 padding: 6 0043 0044 closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent 0045 0046 contentItem: Controls.Label { 0047 text: controlRoot.text 0048 font: controlRoot.font 0049 Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip 0050 color: Kirigami.Theme.textColor 0051 } 0052 0053 0054 background: Rectangle { 0055 radius: 3 0056 opacity: 0.95 0057 color: Kirigami.Theme.backgroundColor 0058 Kirigami.Theme.colorSet: Kirigami.Theme.Tooltip 0059 layer.enabled: true 0060 layer.effect: DropShadow { 0061 transparentBorder: true 0062 radius: 4 0063 samples: 8 0064 horizontalOffset: 0 0065 verticalOffset: 2 0066 color: Qt.rgba(0, 0, 0, 0.3) 0067 } 0068 } 0069 0070 }