blob: 96c4c7feda0b872dfd69b860c85a470e4adb9701 (
plain)
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
|
import QtQuick
MouseArea {
id: iconButton
property string icon: ""
property string tooltip: ""
width: 32
height: 32
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
enabled: true
z: 10
Rectangle {
anchors.fill: parent
color: "transparent"
radius: 6
Behavior on color {
ColorAnimation { duration: 200 }
}
Text {
id: iconText
anchors.centerIn: parent
text: iconButton.icon
font.family: shellRoot.fontFamily
font.pixelSize: 22
color: shellRoot.white
Component.onCompleted: {
console.log("IconButton text:", iconButton.icon, "length:", iconButton.icon.length)
}
}
}
}
|