Scorganizr/SiteInConstruction.qml

40 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Controls.Material
Item {
id: siteInConstruction
anchors.fill: parent
property string inDevIconDataURI: `data:image/svg+xml;utf8,
<svg xmlns="http://www.w3.org/2000/svg">
<path d="M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"/>
</svg>`
property string subtitle: ""
// workaround to prevent the error "Point size [...] must be greater than 0"
function getFontSize(s) {
return s <= 0 ? 1 : s;
}
children: [
Icon {
id: inDevIcon
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
path: parent.inDevIconDataURI
width: parent.width/5
height: width
color: Material.foreground
},
Text {
id: inDevText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: inDevIcon.bottom
anchors.margins: inDevIcon.width/10
font.pointSize: getFontSize(inDevIcon.width/8)
text: "Site in construction!"
color: Material.foreground
}
]
}