TG-PlatformPlus/qml/Style/ImageButtonStyle.qml

19 lines
620 B
QML
Raw Normal View History

2026-03-02 14:29:58 +08:00
import QtQuick
import QtQuick.Controls.Styles
Component {
ButtonStyle {
background: Rectangle {
implicitWidth: 35
implicitHeight: 35
color: control.hovered ? (control.text.indexOf("close") > -1 ? "#eb1123": "#05357c") : "#0076f6"
Image {
anchors.centerIn: parent
width: control.text.indexOf("min") > -1 ? 20 : 10
height: control.text.indexOf("min") > -1 ? 20 : 10
source: control.pressed ? control.text+"press.png" : control.text+".png"
}
}
label: Text {}
}
}