mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 12:04:51 +00:00
use pieces wanted instead of total pieces to draw adv progress bar
This commit is contained in:
parent
790eda0f2c
commit
d1eb4bc8d6
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ class DetailsTabManager(object):
|
|||
if state != None:
|
||||
gc.set_foreground(colormap.alloc_color('#2020FF'))
|
||||
progress_window.draw_rectangle(gc, True, 0, top, int(size[0] * state['progress']), 4)
|
||||
num_pieces = state["num_pieces"]
|
||||
num_pieces = state["total_wanted"] / state["piece_length"]
|
||||
for pieces_range in state['pieces']:
|
||||
range_first = pieces_range[0] * size[0] / num_pieces
|
||||
range_length = ((pieces_range[1] - pieces_range[0] + 1) * size[0] / num_pieces)
|
||||
|
|
Loading…
Add table
Reference in a new issue