Skip to content

Commit c7aaa8b

Browse files
authored
Improve readability of progress bars (#16509)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Improve readability of progress bars by drawing the right portions in dimmed black instead of dimmed green. This makes it much easier to distinguish from the left (finished) part, which is drawn in green. Fixes #6908. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Tested locally, looks as follows: <img width="1100" height="731" alt="white" src="https://github.com/user-attachments/assets/2a396e96-27ef-41ed-8b03-a0de2061af12" /> <img width="1100" height="731" alt="black" src="https://github.com/user-attachments/assets/85d03a3a-a1dc-4389-9e51-fd486e60e067" />
1 parent f3d3203 commit c7aaa8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/uv/src/commands/reporters.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl ProgressReporter {
230230
// Ignore spinners, such as for builds.
231231
if let ProgressBarKind::Numeric { progress, .. } = progress {
232232
let template = format!(
233-
"{{msg:{max_len}.dim}} {{bar:30.green/dim}} {{binary_bytes:>7}}/{{binary_total_bytes:7}}"
233+
"{{msg:{max_len}.dim}} {{bar:30.green/black.dim}} {{binary_bytes:>7}}/{{binary_total_bytes:7}}"
234234
);
235235
progress.set_style(
236236
ProgressStyle::with_template(&template)
@@ -252,7 +252,7 @@ impl ProgressReporter {
252252
progress.set_style(
253253
ProgressStyle::with_template(
254254
&format!(
255-
"{{msg:{}.dim}} {{bar:30.green/dim}} {{binary_bytes:>7}}/{{binary_total_bytes:7}}", state.max_len
255+
"{{msg:{}.dim}} {{bar:30.green/black.dim}} {{binary_bytes:>7}}/{{binary_total_bytes:7}}", state.max_len
256256
),
257257
)
258258
.unwrap()

0 commit comments

Comments
 (0)