提交 5053ec21 编写于 作者: O obscuren

Added download label

上级 6db40ecb
......@@ -303,6 +303,14 @@ ApplicationWindow {
x: statusBar.width / 2 - this.width / 2
width: 160
}
Label {
objectName: "downloadLabel"
y: 7
anchors.left: downloadIndicator.right
anchors.leftMargin: 5
font.pixelSize: 10
text: "0 / 0"
}
RowLayout {
......
......@@ -466,12 +466,17 @@ func (gui *Gui) update() {
var (
pct float64 = 1.0 / float64(chainLength) * float64(blockLength)
dlWidget = gui.win.Root().ObjectByName("downloadIndicator")
dlLabel = gui.win.Root().ObjectByName("downloadLabel")
)
if pct < 1.0 {
dlWidget.Set("visible", true)
dlWidget.Set("value", pct)
dlLabel.Set("visible", true)
dlLabel.Set("text", fmt.Sprintf("%d / %d", blockLength, chainLength))
} else {
dlWidget.Set("visible", false)
dlLabel.Set("visible", false)
}
case <-statsUpdateTicker.C:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册