Kylin/Fluent/qml/ImageButton.qml
2024-08-31 04:13:21 +08:00

18 lines
465 B
QML

import QtQuick
import QtQuick.Controls as Controls
Controls.Button{
id:control
property string normalImage: ""
property string hoveredImage: ""
property string pushedImage: ""
background: Item{
implicitHeight: 12
implicitWidth: 12
BorderImage {
anchors.fill: parent
source: control.hovered ? (control.pressed ? control.pushedImage : control.hoveredImage ) : control.normalImage
}
}
}