FluentUI/src/controls/FluTextButton.qml

23 lines
548 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: {
if(FluApp.isDark){
2023-03-06 12:09:06 +08:00
return mouse_area.containsMouse?Qt.rgba(73/255,148/255,206/255,1):FluTheme.primaryColor.lighter
2023-03-03 18:19:48 +08:00
}
2023-03-06 12:09:06 +08:00
return mouse_area.containsMouse?Qt.rgba(24/255,116/255,186/255,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()
}
}
}