Fix by doublechecking the remaining width calculation. (#67)

This commit is contained in:
Clement Tsang 2020-03-05 11:46:38 -05:00 committed by GitHub
parent 3a57570031
commit f2b5f96d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1658,8 +1658,7 @@ impl Painter {
let margin_space = 2;
let remaining_width = max(
0,
draw_loc.width as i64
- ((9 + margin_space) * REQUIRED_COLUMNS - margin_space) as i64,
draw_loc.width as i64 - ((9 + margin_space) * REQUIRED_COLUMNS) as i64,
) as usize;
let bar_length = remaining_width / REQUIRED_COLUMNS;