diff --git a/README.md b/README.md index eb0b738..1db0bd3 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,14 @@ bar := p.AddBar(int64(total), // Prepending decorators mpb.PrependDecorators( - // StaticName decorator with minWidth and no extra config - // If you need to change name while rendering, use DynamicName - decor.StaticName(name, len(name), 0), - // ETA decorator with minWidth and no extra config - decor.ETA(4, 0), + // StaticName decorator with one extra space on right + decor.StaticName(name, len(name)+1, decor.DidentRight), + // ETA decorator with width reservation of 3 runes + decor.ETA(3, 0), ), // Appending decorators mpb.AppendDecorators( - // Percentage decorator with minWidth and no extra config + // Percentage decorator with width reservation of 5 runes decor.Percentage(5, 0), ), ) diff --git a/examples/singleBar/main.go b/examples/singleBar/main.go index 62452c7..062911a 100644 --- a/examples/singleBar/main.go +++ b/examples/singleBar/main.go @@ -25,15 +25,14 @@ bar := p.AddBar(int64(total), // Prepending decorators mpb.PrependDecorators( - // StaticName decorator with minWidth and no extra config - // If you need to change name while rendering, use DynamicName - decor.StaticName(name, len(name), 0), - // ETA decorator with minWidth and no extra config - decor.ETA(4, 0), + // StaticName decorator with one extra space on right + decor.StaticName(name, len(name)+1, decor.DidentRight), + // ETA decorator with width reservation of 3 runes + decor.ETA(3, 0), ), // Appending decorators mpb.AppendDecorators( - // Percentage decorator with minWidth and no extra config + // Percentage decorator with width reservation of 5 runes decor.Percentage(5, 0), ), )