]> granicus.if.org Git - transmission/commitdiff
DL/UL speed typography changes for web ui
authorAlexander Futekov <futekov@gmail.com>
Mon, 7 Aug 2017 03:34:00 +0000 (06:34 +0300)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2017 03:34:00 +0000 (06:34 +0300)
The current icons are very hard to read at the current font size and it's not immediately visible which icon i which.

Additionally, spaces after icons are removed because upload icon is equally positioned between DL/UL speeds (like so `↓ 273 kB/s **↑** 0 kB/s`) which requires reading the whole line to make sense of which number the arrow applies to.

To further separate one type of information from another the hyphen is replaced by the slightly wider en dash.

Old vs New:
Downloading from 7 of 19 peers - ↓ 273 kB/s ↑ 167 kB/s
Downloading from 7 of 19 peers – ▼273 kB/s ▲167 kB/s

web/javascript/torrent-row.js

index 73b15aece2b65d5d9efe368f17cd12845393760e..5cd3a19b45ab42c801952a278abb201b00b5f9ab 100644 (file)
@@ -100,11 +100,11 @@ TorrentRendererHelper.renderProgressbar = function (controller, t, progressbar)
 };
 
 TorrentRendererHelper.formatUL = function (t) {
-    return 'â\86\91 ' + Transmission.fmt.speedBps(t.getUploadSpeed());
+    return 'â\96²' + Transmission.fmt.speedBps(t.getUploadSpeed());
 };
 
 TorrentRendererHelper.formatDL = function (t) {
-    return 'â\86\93 ' + Transmission.fmt.speedBps(t.getDownloadSpeed());
+    return 'â\96¼' + Transmission.fmt.speedBps(t.getDownloadSpeed());
 };
 
 TorrentRendererHelper.formatETA = function(t) {
@@ -181,7 +181,7 @@ TorrentRendererFull.prototype = {
                     fmt.countString('peer', 'peers', peer_count),
                     'and',
                     fmt.countString('web seed', 'web seeds', webseed_count),
-                    '-',
+                    '',
                     TorrentRendererHelper.formatDL(t),
                     TorrentRendererHelper.formatUL(t)
                 ].join(' ');
@@ -189,7 +189,7 @@ TorrentRendererFull.prototype = {
                 // Downloading from 2 webseed(s)
                 return ['Downloading from',
                     fmt.countString('web seed', 'web seeds', webseed_count),
-                    '-',
+                    '',
                     TorrentRendererHelper.formatDL(t),
                     TorrentRendererHelper.formatUL(t)
                 ].join(' ');
@@ -199,7 +199,7 @@ TorrentRendererFull.prototype = {
                     t.getPeersSendingToUs(),
                     'of',
                     fmt.countString('peer', 'peers', peer_count),
-                    '-',
+                    '',
                     TorrentRendererHelper.formatDL(t),
                     TorrentRendererHelper.formatUL(t)
                 ].join(' ');