diff --git a/_examples/decoratorsOnTop/main.go b/_examples/decoratorsOnTop/main.go index bdd0bd5..21b0708 100644 --- a/_examples/decoratorsOnTop/main.go +++ b/_examples/decoratorsOnTop/main.go @@ -24,7 +24,7 @@ decor.AverageETA(decor.ET_STYLE_GO), "done", ), ), - mpb.BarExtender(nlBarFiller(mpb.NewBarFiller("╢▌▌░╟"))), + mpb.BarExtender(nlBarFiller(mpb.NewBarFiller(mpb.BarStyle()))), ) // simulating some work max := 100 * time.Millisecond diff --git a/_examples/io/main.go b/_examples/io/main.go index bd07df9..fccabe3 100644 --- a/_examples/io/main.go +++ b/_examples/io/main.go @@ -20,7 +20,7 @@ ) bar := p.Add(total, - mpb.NewBarFiller("[=>-|"), + mpb.NewBarFiller(mpb.BarStyle().Rbound("|")), mpb.PrependDecorators( decor.CountersKibiByte("% .2f / % .2f"), ), diff --git a/_examples/reverseBar/main.go b/_examples/reverseBar/main.go index 23450cc..3a8e23d 100644 --- a/_examples/reverseBar/main.go +++ b/_examples/reverseBar/main.go @@ -19,9 +19,13 @@ for i := 0; i < numBars; i++ { name := fmt.Sprintf("Bar#%d:", i) + bs := mpb.BarStyle() + if i == 1 { + // reverse Bar#1 + bs = bs.Tip("<").Reverse() + } bar := p.Add(int64(total), - // reverse Bar#1 - mpb.NewBarFillerPick("", i == 1), + mpb.NewBarFiller(bs), mpb.PrependDecorators( // simple name decorator decor.Name(name), diff --git a/_examples/singleBar/main.go b/_examples/singleBar/main.go index f0ba8ea..3925e8e 100644 --- a/_examples/singleBar/main.go +++ b/_examples/singleBar/main.go @@ -17,7 +17,7 @@ // adding a single bar, which will inherit container's width bar := p.Add(int64(total), // progress bar filler with customized style - mpb.NewBarFiller("╢▌▌░╟"), + mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")), mpb.PrependDecorators( // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), diff --git a/_examples/spinnerBar/main.go b/_examples/spinnerBar/main.go index 7867037..347f519 100644 --- a/_examples/spinnerBar/main.go +++ b/_examples/spinnerBar/main.go @@ -26,7 +26,7 @@ var bar *mpb.Bar if i == 0 { bar = p.Add(int64(total), - mpb.NewBarFiller("╢▌▌░╟"), + mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")), mpb.PrependDecorators( // simple name decorator decor.Name(name), @@ -41,7 +41,7 @@ ) } else { bar = p.Add(int64(total), - mpb.NewSpinnerFiller(spinnerStyle, mpb.SpinnerOnMiddle), + mpb.NewBarFiller(mpb.SpinnerStyle(spinnerStyle...)), mpb.PrependDecorators( // simple name decorator decor.Name(name), diff --git a/example_test.go b/example_test.go index 6f25c1b..38820e1 100644 --- a/example_test.go +++ b/example_test.go @@ -20,7 +20,7 @@ // adding a single bar, which will inherit container's width bar := p.Add(int64(total), // progress bar filler with customized style - mpb.NewBarFiller("╢▌▌░╟"), + mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")), mpb.PrependDecorators( // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),