Skip to content

Commit 66e7532

Browse files
author
Matthieu Hog
committed
added badge
1 parent a3bbc80 commit 66e7532

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import QtQuick 2.15
2+
import QtQuick.Controls 2.15
3+
import QtQuick.Layouts 1.11
4+
import MaterialIcons 2.2
5+
6+
Loader {
7+
id: root
8+
9+
sourceComponent: iconDelegate
10+
11+
signal doBuild()
12+
13+
property Component iconDelegate: Component {
14+
15+
Label {
16+
text: MaterialIcons.warning
17+
font.family: MaterialIcons.fontFamily
18+
font.pointSize: 12
19+
color: "#66207F"
20+
21+
MouseArea {
22+
anchors.fill: parent
23+
hoverEnabled: true
24+
onPressed: mouse.accepted = false
25+
ToolTip.text: "Node env needs to be built"
26+
ToolTip.visible: containsMouse
27+
}
28+
}
29+
}
30+
31+
property Component bannerDelegate: Component {
32+
33+
Pane {
34+
padding: 6
35+
clip: true
36+
background: Rectangle { color: "#66207F" }
37+
38+
RowLayout {
39+
width: parent.width
40+
Column {
41+
Layout.fillWidth: true
42+
Label {
43+
width: parent.width
44+
elide: Label.ElideMiddle
45+
font.bold: true
46+
text: "Env needs to be built"
47+
color: "white"
48+
}
49+
Label {
50+
width: parent.width
51+
elide: Label.ElideMiddle
52+
color: "white"
53+
}
54+
}
55+
Button {
56+
visible: (parent.width > width) ? 1 : 0
57+
palette.window: root.color
58+
palette.button: Qt.darker(root.color, 1.2)
59+
palette.buttonText: "white"
60+
text: "Build"
61+
onClicked: doBuild()
62+
}
63+
}
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)