Warning, /multimedia/elisa/src/qml/FlatButtonWithToolTip.qml is written in an unsupported language. File is not indexed.

0001 /*
0002    SPDX-FileCopyrightText: 2018 (c) Alexander Stippich <a.stippich@gmx.net>
0003 
0004    SPDX-License-Identifier: LGPL-3.0-or-later
0005  */
0006 
0007 import QtQuick 2.15
0008 import QtQuick.Controls 2.15
0009 import QtQuick.Templates 2.15 as T
0010 import org.kde.kirigami 2.15 as Kirigami
0011 import org.kde.elisa 1.0
0012 
0013 ToolButton {
0014     property T.Popup menu
0015 
0016     display: AbstractButton.IconOnly
0017 
0018     ToolTip.visible: hovered
0019                      && text.length > 0
0020                      && display === AbstractButton.IconOnly
0021                      && (menu === null || !menu.visible)
0022     ToolTip.delay: Kirigami.Units.toolTipDelay
0023     ToolTip.text: text
0024 
0025     Keys.onReturnPressed: action ? action.trigger() : clicked()
0026     Keys.onEnterPressed: action ? action.trigger() : clicked()
0027     Accessible.onPressAction: clicked()
0028 }