mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
components: Remove unused ExtendedAbstractButton
This component is not used anywhere in the shell, remove it.
This commit is contained in:
parent
3cc22dd7fb
commit
7c07dc0122
1 changed files with 0 additions and 55 deletions
|
|
@ -1,55 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
|
||||
/**
|
||||
* This component is an AbstractButton with some added functionality to simulate a MouseArea.
|
||||
*
|
||||
* The hovered property of AbstractButton is much more accurate than the containsMouse property of MouseArea,
|
||||
* and so this is useful for creating custom buttons.
|
||||
*/
|
||||
|
||||
QQC2.AbstractButton {
|
||||
id: root
|
||||
|
||||
/**
|
||||
* The cursor shape when the mouse is over the button.
|
||||
*/
|
||||
property alias cursorShape: hoverHandler.cursorShape
|
||||
|
||||
/**
|
||||
* Alias to MouseArea used in the button.
|
||||
*/
|
||||
property alias mouseArea: mouseArea
|
||||
|
||||
/**
|
||||
* Whether a mouse is hovering over the button (not touch).
|
||||
*/
|
||||
readonly property bool mouseHovered: hoverHandler.hovered
|
||||
|
||||
/**
|
||||
* Signal that is emitted when the right click button is pressed.
|
||||
*/
|
||||
signal rightClickPressed()
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onPressed: mouse => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
root.rightClickPressed();
|
||||
} else {
|
||||
mouse.accepted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
acceptedDevices: PointerDevice.Mouse
|
||||
acceptedPointerTypes: PointerDevice.Generic
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue