From 7c07dc0122b67ee38b76aec5f41f57b8f6dcf327 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Wed, 25 Jun 2025 13:15:58 -0400 Subject: [PATCH] components: Remove unused ExtendedAbstractButton This component is not used anywhere in the shell, remove it. --- .../qml/components/ExtendedAbstractButton.qml | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 components/mobileshell/qml/components/ExtendedAbstractButton.qml diff --git a/components/mobileshell/qml/components/ExtendedAbstractButton.qml b/components/mobileshell/qml/components/ExtendedAbstractButton.qml deleted file mode 100644 index 1065e51f..00000000 --- a/components/mobileshell/qml/components/ExtendedAbstractButton.qml +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2022 Devin Lin -// 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 - } -}