From 255e1b76172de41268eb92a45f21814fe8421f4f Mon Sep 17 00:00:00 2001 From: Vladimir Bauer Date: Wed, 22 Nov 2023 12:13:04 +0500 Subject: [PATCH] refactoring complex example --- _examples/complex/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_examples/complex/main.go b/_examples/complex/main.go index e64f18d3..7647dbd7 100644 --- a/_examples/complex/main.go +++ b/_examples/complex/main.go @@ -25,7 +25,7 @@ func main() { queue := make([]*mpb.Bar, 2) queue[0] = p.AddBar(rand.Int63n(201)+100, mpb.PrependDecorators( - decor.Name(task, decor.WC{W: len(task) + 1, C: decor.DidentRight}), + decor.Name(task, decor.WC{C: decor.DindentRight | decor.DextraSpace}), decor.Name("downloading", decor.WCSyncSpaceR), decor.CountersNoUnit("%d / %d", decor.WCSyncWidth), ), @@ -37,7 +37,7 @@ func main() { mpb.BarQueueAfter(queue[0]), // this bar is queued mpb.BarFillerClearOnComplete(), mpb.PrependDecorators( - decor.Name(task, decor.WC{W: len(task) + 1, C: decor.DidentRight}), + decor.Name(task, decor.WC{C: decor.DindentRight | decor.DextraSpace}), decor.OnCompleteMeta( decor.OnComplete( decor.Meta(decor.Name("installing", decor.WCSyncSpaceR), toMetaFunc(red)),