mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-14 19:28:53 +08:00
Fixed percentage calculation for progress spinner for user-defined option::MaxProgress
This commit is contained in:
@@ -181,7 +181,7 @@ public:
|
||||
os << get_value<details::ProgressBarOption::spinner_states>()
|
||||
[index_ % get_value<details::ProgressBarOption::spinner_states>().size()];
|
||||
if (get_value<details::ProgressBarOption::show_percentage>()) {
|
||||
os << " " << std::min(progress_, size_t(max_progress)) << "%";
|
||||
os << " " << std::size_t(progress_ / double(max_progress) * 100) << "%";
|
||||
}
|
||||
|
||||
if (get_value<details::ProgressBarOption::show_elapsed_time>()) {
|
||||
|
||||
Reference in New Issue
Block a user