From 5053ec21902727864d77664556fee144514bfa85 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 2 Oct 2014 01:37:23 +0200 Subject: [PATCH] Added download label --- mist/assets/qml/main.qml | 8 ++++++++ mist/gui.go | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/mist/assets/qml/main.qml b/mist/assets/qml/main.qml index 0ee063f17..b39c0ef0e 100644 --- a/mist/assets/qml/main.qml +++ b/mist/assets/qml/main.qml @@ -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 { diff --git a/mist/gui.go b/mist/gui.go index 45ef66624..7d851243f 100644 --- a/mist/gui.go +++ b/mist/gui.go @@ -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: -- GitLab