fix the progress bar in the files tab
This commit is contained in:
parent
ff262acbdf
commit
ed36526a24
@ -175,7 +175,7 @@ input {
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-top: -1px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-tree .x-progress-renderered .x-progress-bar .x-progress-text {
|
.x-tree .x-progress-renderered .x-progress-bar .x-progress-text {
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Copyright:
|
|||||||
/* Renderers for the column tree */
|
/* Renderers for the column tree */
|
||||||
function fileProgressRenderer(value) {
|
function fileProgressRenderer(value) {
|
||||||
var progress = value * 100;
|
var progress = value * 100;
|
||||||
return Deluge.progressBar(progress, this.width - 50, progress.toFixed(2) + '%');
|
return Deluge.progressBar(progress, this.width - 50, progress.toFixed(2) + '%', 0);
|
||||||
}
|
}
|
||||||
function priorityRenderer(value) {
|
function priorityRenderer(value) {
|
||||||
return String.format('<div class="{0}">{1}</div>', FILE_PRIORITY_CSS[value], _(FILE_PRIORITY[value]));
|
return String.format('<div class="{0}">{1}</div>', FILE_PRIORITY_CSS[value], _(FILE_PRIORITY[value]));
|
||||||
|
|||||||
@ -77,10 +77,11 @@ Ext.namespace('Ext.deluge');
|
|||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
Deluge.progressBar = function(progress, width, text) {
|
Deluge.progressBar = function(progress, width, text, modifier) {
|
||||||
|
modifier = Ext.value(modifier, 10);
|
||||||
var progressWidth = ((width / 100.0) * progress).toFixed(0);
|
var progressWidth = ((width / 100.0) * progress).toFixed(0);
|
||||||
var barWidth = progressWidth - 1;
|
var barWidth = progressWidth - 1;
|
||||||
var textWidth = ((progressWidth - 10) > 0 ? progressWidth - 10 : 0);
|
var textWidth = ((progressWidth - modifier) > 0 ? progressWidth - modifier : 0);
|
||||||
return String.format(tpl, text, width, barWidth, textWidth);
|
return String.format(tpl, text, width, barWidth, textWidth);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user