summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug_2114_fixed-traffic-indicators1
-rw-r--r--src/leap/gui/mainwindow.py8
2 files changed, 5 insertions, 4 deletions
diff --git a/changes/bug_2114_fixed-traffic-indicators b/changes/bug_2114_fixed-traffic-indicators
new file mode 100644
index 00000000..6c91f35d
--- /dev/null
+++ b/changes/bug_2114_fixed-traffic-indicators
@@ -0,0 +1 @@
+ o Make traffic indicators display fixed precision. Closes: #2114
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 863640ef..3fa3aad3 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -181,11 +181,11 @@ class MainWindow(QtGui.QMainWindow):
self._stop_eip)
self._action_eip_write = QtGui.QAction(
QtGui.QIcon(":/images/Arrow-Up-32.png"),
- "0.0 Kb", self)
+ "%12.2f Kb" % (0.0,), self)
self._action_eip_write.setEnabled(False)
self._action_eip_read = QtGui.QAction(
QtGui.QIcon(":/images/Arrow-Down-32.png"),
- "0.0 Kb", self)
+ "%12.2f Kb" % (0.0,), self)
self._action_eip_read.setEnabled(False)
self._action_visible = QtGui.QAction(self.tr("Hide"), self)
@@ -758,12 +758,12 @@ class MainWindow(QtGui.QMainWindow):
"""
upload = float(data[self._vpn.TUNTAP_WRITE_KEY])
upload = upload / 1000.0
- upload_str = "%s Kb" % (upload,)
+ upload_str = "%12.2f Kb" % (upload,)
self.ui.lblUpload.setText(upload_str)
self._action_eip_write.setText(upload_str)
download = float(data[self._vpn.TUNTAP_READ_KEY])
download = download / 1000.0
- download_str = "%s Kb" % (download,)
+ download_str = "%12.2f Kb" % (download,)
self.ui.lblDownload.setText(download_str)
self._action_eip_read.setText(download_str)