eden/src/Eden/Items/StatusBarButton.qml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
666 B
QML
Raw Normal View History

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
}
}
}