From c08296890ae3ec0a55561315cb8421e56810a91f Mon Sep 17 00:00:00 2001 From: Mygod Date: Sat, 21 Nov 2015 15:11:48 +0800 Subject: [PATCH] Refine traffic display --- src/main/res/values-zh/strings.xml | 3 +-- src/main/res/values/strings.xml | 4 ++-- .../scala/com/github/shadowsocks/utils/TrafficMonitor.scala | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/res/values-zh/strings.xml b/src/main/res/values-zh/strings.xml index 6ab8edc8..9db0cf6c 100755 --- a/src/main/res/values-zh/strings.xml +++ b/src/main/res/values-zh/strings.xml @@ -74,8 +74,7 @@ 向远程服务器转发 IPv6 流量 网络流量 - 发送:\t%1$s\t|\t接收:\t%2$s\n上传:\t%3$s\t|\t下载:\t%4$s - \n已发送: \t%1$s\n已接收: \t%2$s + 发送: \t%3$s\t↑\t%1$s/s\n接收: \t%4$s\t↓\t%2$s/s 字节 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 83eb0ead..02f32d08 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -13,8 +13,8 @@ Use NAT mode instead of VPN mode NAT mode is disabled without root Network Traffic - Sent: \t%1$s\t|\tReceived: \t%2$s\nUpload: \t%3$s\t|\tDownload: \t%4$s - \nTotal Sent: \t%1$s\nTotal Received: \t%2$s + Sent: \t\t\t\t\t%3$s\t↑\t%1$s/s\nReceived: \t%4$s\t↓\t%2$s/s + \n%1$s↑\t%2$s↓ Byte Bytes diff --git a/src/main/scala/com/github/shadowsocks/utils/TrafficMonitor.scala b/src/main/scala/com/github/shadowsocks/utils/TrafficMonitor.scala index 9058c470..7d413a5e 100644 --- a/src/main/scala/com/github/shadowsocks/utils/TrafficMonitor.scala +++ b/src/main/scala/com/github/shadowsocks/utils/TrafficMonitor.scala @@ -74,15 +74,15 @@ object TrafficMonitor { } def getTxRate(): String = { - formatTraffic(txRate) + "/s" + formatTraffic(txRate) } def getRxRate(): String = { - formatTraffic(rxRate) + "/s" + formatTraffic(rxRate) } def getRate(): String = { - formatTraffic(txRate + rxRate) + "/s" + formatTraffic(txRate + rxRate) } }