1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
Item {
id: button
signal clicked
property string text
property color color: "white"
width : 144
height: 70
BorderImage {
id: buttonImage
source: "images/toolbutton.sci"
width: button.width; height: button.height
}
MouseArea {
id: mouseRegion
anchors.fill: buttonImage
onClicked: { button.clicked(); }
}
Text {
id: btnText
anchors.fill: buttonImage
anchors.margins: 5
text: button.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
color: button.color
font.bold: true
style: Text.Raised
styleColor: "black"
font.pixelSize: 14
}
}
|