(trunk web) #4443 "progress bar colors for queued transfers" -- fixed.

This commit is contained in:
Jordan Lee 2011-08-25 06:18:42 +00:00
parent 741f3190dc
commit f2b255a33d
4 changed files with 50 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 938 B

View File

@ -27,15 +27,20 @@ TorrentRendererHelper.getProgressInfo = function(controller, t)
else
pct = 100;
var extra;
if (t.isStopped())
var extra = '';
var s = t.getStatus();
if (s == Torrent._StatusStopped)
extra = 'paused';
else if (t.isSeeding())
extra = 'seeding';
else if (s == Torrent._StatusDownloadWait)
extra = 'leeching queued';
else if (t.needsMetaData())
extra = 'magnet';
else
else if (s === Torrent._StatusDownload)
extra = 'leeching';
else if (s == Torrent._StatusSeedWait)
extra = 'seeding queued';
else if (s == Torrent._StatusSeed)
extra = 'seeding';
return {
percent: pct,
@ -271,9 +276,20 @@ TorrentRendererCompact.prototype =
var c;
if ((c = t.getErrorMessage()))
return c;
if (t.isDownloading())
return [ TorrentRendererHelper.formatDL(t),
TorrentRendererHelper.formatUL(t) ].join(' ');
if (t.isDownloading()) {
var have_dn = t.getDownloadSpeed() > 0;
var have_up = t.getUploadSpeed() > 0;
if (!have_up && !have_dn)
return 'Idle';
var s = '';
if (have_dn)
s += TorrentRendererHelper.formatDL(t);
if (have_dn && have_up)
s += ' '
if (have_up)
s += TorrentRendererHelper.formatUL(t);
return s;
}
if (t.isSeeding())
return [ 'Ratio: ',
Transmission.fmt.ratioString(t.getUploadRatio()),

View File

@ -380,7 +380,7 @@ ul.torrent_list li.torrent.selected div.torrent_peer_details.error {
* is pinned to the left side of the parent and has a higher z-index.
*
* The progressbar has different colors depending on its state, so there
* are four 'decorator' classNames: magnet, seeding, leeching, and paused.
* are five 'decorator' classNames: paused, queued, magnet, leeching, seeding.
*/
ul.torrent_list div.torrent_progress_bar_container {
@ -441,14 +441,26 @@ ul.torrent_list div.torrent_progress_bar.complete.leeching {
background-position: left 0px;
border-color: #3D9DEA;
}
ul.torrent_list div.torrent_progress_bar.complete.leeching.queued {
background-position: left -70px;
border-color: #889CA5;
}
ul.torrent_list div.torrent_progress_bar.incomplete.leeching {
background-position: left -20px;
border-color: #CFCFCF;
}
ul.torrent_list div.torrent_progress_bar.incomplete.leeching.queued {
background-position: left -80px;
border-color: #C4C4C4;
}
ul.torrent_list div.torrent_progress_bar.complete.seeding {
background-position: left -40px;
border-color: #269E30;
}
ul.torrent_list div.torrent_progress_bar.complete.seeding.queued {
background-position: left -60px;
border-color: #8A998D;
}
ul.torrent_list div.torrent_progress_bar.incomplete.seeding {
background-position: left -10px;
border-color: #29AD35;

View File

@ -341,7 +341,7 @@ div.torrent_peer_details {
* is pinned to the left side of the parent and has a higher z-index.
*
* The progressbar has different colors depending on its state, so there
* are four 'decorator' classNames: magnet, seeding, leeching, and paused.
* are five 'decorator' classNames: paused, queued, magnet, leeching, seeding.
*/
ul.torrent_list div.torrent_progress_bar_container {
@ -402,14 +402,26 @@ ul.torrent_list div.torrent_progress_bar.complete.leeching {
background-position: left 0px;
border-color: #3D9DEA;
}
ul.torrent_list div.torrent_progress_bar.complete.leeching.queued {
background-position: left -70px;
border-color: #889CA5;
}
ul.torrent_list div.torrent_progress_bar.incomplete.leeching {
background-position: left -20px;
border-color: #CFCFCF;
}
ul.torrent_list div.torrent_progress_bar.incomplete.leeching.queued {
background-position: left -80px;
border-color: #C4C4C4;
}
ul.torrent_list div.torrent_progress_bar.complete.seeding {
background-position: left -40px;
border-color: #269E30;
}
ul.torrent_list div.torrent_progress_bar.complete.seeding.queued {
background-position: left -60px;
border-color: #8A998D;
}
ul.torrent_list div.torrent_progress_bar.incomplete.seeding {
background-position: left -10px;
border-color: #29AD35;