Tristan
Tristan

Reputation: 3068

Cocoa Volume Bar

We've probably all seen this guy before - something like a long aqua button, but with lines of different colours inside. They grow larger and change colours depending on some sort of volume. They are apparently called Audio Bars, as I found out by sniffing around the system art using ThemePark. In case you're still confused, I mean something like this (in iChat):

Audio bar

Is there any ready-made control that will give me this, either in the system itself, a library, or otherwise? I'm guessing I'd have to implement it myself, but I'm not entirely sure how. These images are all small capsules that can be stretched, using pieces I suppose, but I don't want to fill my app up with 3 pieces for each one of the different bar states.

Upvotes: 1

Views: 558

Answers (2)

Rob Keniger
Rob Keniger

Reputation: 46028

That's an NSLevelIndicator, which is a standard control and is in the Interface Builder library.

The standard NSLevelIndicator does not have that exact appearance so you'd need to implement a custom NSLevelIndicatorCell subclass if you wanted the level indicator to look exactly the same.

Upvotes: 3

TechZen
TechZen

Reputation: 64428

In this case, you are looking at a graphic which is the capsule shape with the little notched bars. The color bar indicating volume is drawn separately. The coloring of the bars combined with the color of the progressing highlight makes the bars appear to be much darker under the highlight.

So, to reproduce, you really need the standard progress bar and one graphic. You will have to fiddle with the colors to get the bars to standout.

Upvotes: 1

Related Questions