framelesshelper/resources/qml/MinimizeButton.qml

24 lines
540 B
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
Button {
id: button
implicitWidth: 45
implicitHeight: 30
ToolTip.visible: hovered && !down
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
ToolTip.text: qsTr("Minimize")
contentItem: Image {
anchors.fill: parent
source: "qrc:/images/button_minimize_black.svg"
}
background: Rectangle {
visible: button.down || button.hovered
color: button.down ? "#808080" : (button.hovered ? "#c7c7c7" : "transparent")
}
}