diff options
author | Damien Churchill <damoxc@gmail.com> | 2011-10-05 02:05:58 +0100 |
---|---|---|
committer | Damien Churchill <damoxc@gmail.com> | 2011-10-05 02:05:58 +0100 |
commit | 2853d028fd8bfaa31794fe5c854b00609186c5fb (patch) | |
tree | 6880ad8c7f3578d77471059632315c233bdf8ea2 | |
parent | 4ab5c6d9dee9f7b33fe395ec0a78a0a4ad9b92ad (diff) | |
download | deluge-2853d028fd8bfaa31794fe5c854b00609186c5fb.tar.gz deluge-2853d028fd8bfaa31794fe5c854b00609186c5fb.tar.bz2 deluge-2853d028fd8bfaa31794fe5c854b00609186c5fb.zip |
web: more progressbar fixes
Fix displaying the progress bars within the peers tab, also
reduce the modifier so that the bars don't overflow their
containers.
-rw-r--r-- | deluge/ui/web/js/deluge-all/Deluge.js | 4 | ||||
-rw-r--r-- | deluge/ui/web/js/deluge-all/details/PeersTab.js | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/deluge/ui/web/js/deluge-all/Deluge.js b/deluge/ui/web/js/deluge-all/Deluge.js index d4c8859bd..2193ef35b 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.js +++ b/deluge/ui/web/js/deluge-all/Deluge.js @@ -101,7 +101,7 @@ Ext.apply(Deluge, { // private progressTpl: '<div class="x-progress x-progress-default">' + '<div class="x-progress-text x-progress-text-back" style="width: {1}px;">{0}</div>' + - '<div class="x-progress-bar" style="width: {2}px;">' + + '<div class="x-progress-bar" style="width: {3}px;">' + '<div class="x-progress-text" style="width: {1}px;">{0}</div>' + '</div>' + '</div>', @@ -116,7 +116,7 @@ Ext.apply(Deluge, { * @param {Number} modified Amount to subtract from the width allowing for fixes */ progressBar: function(progress, width, text, modifier) { - modifier = Ext.value(modifier, 10); + modifier = Ext.value(modifier, 5); var progressWidth = ((width / 100.0) * progress).toFixed(0); var barWidth = progressWidth - 1; var textWidth = ((progressWidth - modifier) > 0 ? progressWidth - modifier : 0); diff --git a/deluge/ui/web/js/deluge-all/details/PeersTab.js b/deluge/ui/web/js/deluge-all/details/PeersTab.js index 3f03ccc2e..9c93db5b6 100644 --- a/deluge/ui/web/js/deluge-all/details/PeersTab.js +++ b/deluge/ui/web/js/deluge-all/details/PeersTab.js @@ -84,8 +84,9 @@ Ext.define('Deluge.details.PeersTab', { width: 150, sortable: true, renderer: function(v) { - var progress = (v * 100).toFixed(0); - return Deluge.progressBar(progress, this.width - 8, progress + '%'); + var progress = (v * 100).toFixed(0), + width = this.query('gridcolumn[dataIndex=progress]')[0].getWidth(); + return Deluge.progressBar(progress, width - 8, progress + '%'); } }, { text: 'Down Speed', |