Made latency labels static size to prevent shifting
Latencies displayed in the widget can be of different precisions, causing the widget to redraw when the precision changes. It's a little annoying. This makes latency precision static at 2 decimal places.
This commit is contained in:
parent
2be6c388ad
commit
9df9559c9c
|
@ -114,10 +114,10 @@ class Pinger:
|
|||
label = "PING FAIL"
|
||||
self.log_ping(-1)
|
||||
else:
|
||||
label = m.group(1)+" ms"
|
||||
self.log_ping(m.group(1))
|
||||
latency = "%.2f" % float(m.group(1))
|
||||
label = latency+" ms"
|
||||
self.log_ping(latency)
|
||||
self.ind.set_label(label, "100.0 ms")
|
||||
#self.ping_menu_item.set_label(out)
|
||||
gobject.timeout_add_seconds(self.timeout, self.ping)
|
||||
|
||||
def log_ping(self, value):
|
||||
|
|
Loading…
Reference in New Issue
Block a user