Warning, /plasma/latte-dock/declarativeimports/components/ToolTip.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2019 Michail Vourlakos <mvourlakos@gmail.com>
0003 SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005
0006 import QtQuick 2.6
0007 import QtQuick.Controls 1.4
0008 import QtQuick.Templates 2.2 as T
0009 import org.kde.plasma.core 2.0 as PlasmaCore
0010
0011 T.ToolTip {
0012 id: control
0013
0014 x: parent ? (parent.width - implicitWidth) / 2 : 0
0015 y: -implicitHeight - 3
0016
0017 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
0018 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
0019
0020 margins: units.gridUnit
0021 leftPadding: background.margins.left
0022 topPadding: background.margins.top
0023 rightPadding: background.margins.right
0024 bottomPadding: background.margins.bottom
0025
0026 closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
0027
0028 contentItem: Label {
0029 text: control.text
0030 font: control.font
0031 color: PlasmaCore.ColorScope.textColor
0032 }
0033
0034 background: PlasmaCore.FrameSvgItem {
0035 imagePath: "widgets/background"
0036 enabledBorders: PlasmaCore.FrameSvg.AllBorders
0037 }
0038 }