Files

136 lines
4.0 KiB
QML
Raw Permalink Normal View History

2025-01-05 17:42:12 +01:00
import QtQuick
import QtQuick.Controls.Basic
ApplicationWindow {
2025-01-05 18:55:40 +01:00
id: root
2025-01-05 18:39:06 +01:00
title: "Translation Statistics"
2025-01-05 18:55:40 +01:00
width: 400
2025-01-05 18:39:06 +01:00
height: 400
minimumWidth: 360
2025-01-05 17:42:12 +01:00
minimumHeight: 400
visible: true
2025-01-05 18:39:06 +01:00
palette {
window: "#e0dfde";
base: "#e8e7e6";
alternateBase: "#e2e1e0";
light: "#dddcdb";
dark: "#353637";
mid: "#bdbdbd";
windowText: "#26282a";
text: "#26282a";
brightText: "#555658";
button: "#bfbebd";
buttonText: "#26282a";
highlight: "#0066ff";
highlightedText: "#f9f9f9";
toolTipBase: "#ffffff";
toolTipText: "#000000";
shadow: "#7abd84";
midlight: "#5c9e67"
link: "#45a7d7";
linkVisited: "#7f8c8d";
}
Item {
anchors.fill: parent
Text {
y: 10
2025-01-05 18:55:40 +01:00
x: 90
font.pixelSize: 18
color: "black"
2025-01-05 18:39:06 +01:00
text: {
var rc = "Mobile";
var rows = Stats.rows;
for (let i = 0; i < rows.length; i = i + 1) {
var r = rows[i];
if (r.language === "en")
rc += " (" + rows[i].mobileStringCount + ")";
}
return rc;
}
}
Text {
y: 10
2025-01-05 18:55:40 +01:00
x: 230
font.pixelSize: 18
color: "black"
2025-01-05 18:39:06 +01:00
text: {
var rc = "Desktop";
var rows = Stats.rows;
for (let i = 0; i < rows.length; i = i + 1) {
var r = rows[i];
if (r.language === "en")
rc += " (" + rows[i].desktopStringCount + ")";
}
return rc;
}
}
Column {
width: parent.width
2025-01-05 18:55:40 +01:00
y: 40
2025-01-05 18:39:06 +01:00
Repeater {
model: Stats.rows
delegate: Item {
visible: modelData.language !== "en"
height: visible ? 40 : 0
width: 300
Text {
2025-01-05 18:55:40 +01:00
font.pixelSize: 16
2025-01-05 18:39:06 +01:00
color: "black"
text: modelData.language
2025-01-05 18:55:40 +01:00
x: 74 - width
y: 5 + 25 / 2 - height / 2
2025-01-05 18:39:06 +01:00
}
Rectangle {
2025-01-05 18:55:40 +01:00
x: 80
2025-01-05 18:39:06 +01:00
y: 5
height: 25
radius: 6
color: "#90e4b5"
width: modelData.doneMobile /modelData.mobileStringCount * 140
Text {
color: "#333333"
text: (modelData.doneMobile / modelData.mobileStringCount * 100).toFixed(0) + "%";
x: 10
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 16
}
}
Rectangle {
2025-01-05 18:55:40 +01:00
x: 230
2025-01-05 18:39:06 +01:00
y: 5
height: 25
radius: 6
color: "#90e4b5"
width: modelData.doneDesktop / modelData.desktopStringCount * 140
Text {
color: "#333333"
text: (modelData.doneDesktop / modelData.desktopStringCount * 100).toFixed(0) + "%";
x: 10
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 16
}
}
}
}
}
2025-01-05 18:55:40 +01:00
Text {
text: "Translation status of Flowee Pay. (2025.00.0)"
font.pixelSize: 16
color: "black"
x: 10
y: root.height - height - 10
width: root.width - 20
wrapMode: Text.WordWrap
}
2025-01-05 17:42:12 +01:00
}
}