FluentUI/src/controls/FluTextButton.qml

23 lines
570 B
QML
Raw Normal View History

2023-03-03 18:19:48 +08:00
import QtQuick 2.15
import FluentUI 1.0
FluText {
id:root
color: {
2023-03-06 14:22:13 +08:00
if(FluTheme.isDark){
return mouse_area.containsMouse?Qt.darker(FluTheme.primaryColor.lighter,1.1):FluTheme.primaryColor.lighter
2023-03-03 18:19:48 +08:00
}
2023-03-06 14:22:13 +08:00
return mouse_area.containsMouse?Qt.lighter(FluTheme.primaryColor.dark,1.1):FluTheme.primaryColor.dark
2023-03-03 18:19:48 +08:00
}
signal clicked
MouseArea{
id:mouse_area
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
root.clicked()
}
}
}