mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos.git
synced 2026-11-03 12:34:27 +00:00
33 lines
771 B
QML
33 lines
771 B
QML
import QtQuick
|
|
|
|
Rectangle {
|
|
id: root
|
|
property string glyph: ""
|
|
property bool active: false
|
|
property color fg: Theme.fg
|
|
property color accent: Theme.accent
|
|
signal clicked()
|
|
|
|
width: 48
|
|
height: 48
|
|
color: mouseArea.containsMouse ? Theme.bgAlt : "transparent"
|
|
border.width: active ? 2 : 1
|
|
border.color: active ? accent : Theme.borderDim
|
|
radius: 0
|
|
|
|
Text {
|
|
anchors.centerIn: parent
|
|
text: root.glyph
|
|
color: root.active ? root.accent : root.fg
|
|
font.family: "JetBrainsMono Nerd Font"
|
|
font.pixelSize: 21
|
|
}
|
|
|
|
MouseArea {
|
|
id: mouseArea
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
cursorShape: Qt.PointingHandCursor
|
|
onClicked: root.clicked()
|
|
}
|
|
}
|