Warning, /multimedia/kdenlive/src/monitor/view/MonitorToolButton.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2022 Julius Künzel <jk.kdedev@smartlab.uber.space>
0003     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 
0006 import QtQuick 2.15
0007 import QtQuick.Controls 2.15
0008 
0009 
0010 ToolButton {
0011     property string iconName
0012     property string toolTipText
0013     contentItem: Item {
0014         Image {
0015             visible: iconName
0016             source: 'image://icon/' + iconName
0017             anchors.centerIn: parent
0018             width: parent.width - 4
0019             height: width
0020         }
0021     }
0022     width: parent.width
0023     height: width
0024     focusPolicy: Qt.NoFocus
0025     onPressed: {
0026         root.captureRightClick = true
0027     }
0028     onReleased: {
0029         root.updateClickCapture()
0030     }
0031     ToolTip {
0032         visible: parent.hovered
0033         delay: Qt.styleHints.mousePressAndHoldInterval
0034         text: toolTipText
0035         timeout: 3000
0036     }
0037 }