eden/src/Eden/Items/StatusBarButton.qml
2025-09-14 16:00:54 -04:00

36 lines
666 B
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Eden.Constants
MouseArea {
id: button
required property string text
property color textColor: Constants.text
implicitHeight: 20
implicitWidth: txt.width
hoverEnabled: true
onHoveredChanged: rect.color = containsMouse ? Constants.buttonHighlighted : "transparent"
Rectangle {
id: rect
anchors.fill: parent
color: "transparent"
Text {
id: txt
font.pixelSize: 12
leftPadding: 4
rightPadding: 4
color: button.textColor
text: button.text
}
}
}