Files
2024-11-29 07:56:21 +01:00

42 lines
842 B
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
Item {
implicitHeight: rebootButton.height
implicitWidth: rebootButton.width
Button {
id: rebootButton
height: inputHeight
width: inputHeight
hoverEnabled: true
icon {
source: Qt.resolvedUrl("../icons/reboot.svg")
height: height
width: width
color: config.crust
}
background: Rectangle {
id: rebootButtonBackground
radius: 3
color: config.red
}
states: [
State {
name: "hovered"
when: rebootButton.hovered
PropertyChanges {
target: rebootButtonBackground
color: config.rosewater
}
}
]
transitions: Transition {
PropertyAnimation {
properties: "color"
duration: 300
}
}
onClicked: sddm.reboot()
}
}