28 lines
640 B
QML
28 lines
640 B
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
|
|
import Utils 1.0
|
|
|
|
Button {
|
|
id: control
|
|
|
|
icon.width: 24
|
|
icon.height: 24
|
|
|
|
contentItem: Image {
|
|
source: control.icon.source
|
|
sourceSize.width: control.icon.width
|
|
sourceSize.height: control.icon.height
|
|
fillMode: Image.PreserveAspectFit
|
|
}
|
|
|
|
background: Rectangle {
|
|
implicitWidth: 44
|
|
implicitHeight: 44
|
|
opacity: enabled ? 1 : 0.3
|
|
color: control.pressed ? Palette.pressedButtonColor :
|
|
control.hovered ? Palette.hoveredButtonColor : Palette.buttonColor
|
|
radius: 5
|
|
}
|
|
}
|