nexoniarz-config-nixos/dotfiles/quickshell/DeleteTileButton.qml
2026-08-30 01:26:52 +02:00

36 lines
919 B
QML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import QtQuick
// Small "x" corner button for deleting a grid tile (wallpapers) — only
// meant to be shown while the tile itself is hovered, matching the
// hover-to-reveal pattern used for clearing a single notification.
Rectangle {
id: root
signal clicked()
width: 18
height: 18
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 4
z: 1
color: mouseArea.containsMouse ? Theme.danger : Theme.bg
border.width: 1
border.color: Theme.danger
Text {
anchors.centerIn: parent
text: "×"
color: mouseArea.containsMouse ? Theme.bg : Theme.danger
font.family: "JetBrainsMono Nerd Font"
font.pixelSize: 12
font.bold: true
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
}