可可量棒

发布于 2024-10-21 18:15:51 字数 322 浏览 0 评论 0原文

我们以前可能都见过这个家伙——就像一个长长的水绿色按钮,但里面有不同颜色的线条。它们会变大并根据某种体积改变颜色。它们显然被称为“音频栏”,这是我通过使用 ThemePark 嗅探系统艺术而发现的。如果您仍然感到困惑,我的意思是这样的(在 iChat 中):

Audio bar

有没有现成的可以给我这个的控件,无论是在系统本身、库还是其他地方?我猜我必须自己实现它,但我不完全确定如何实现。这些图像都是可以拉伸的小胶囊,我想是使用片段,但我不想为每个不同的条状态用 3 个片段填充我的应用程序。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

昇り龍 2024-10-28 18:15:51

这是一个 NSLevelIndicator,这是一个标准控件,位于 Interface Builder 库中。

标准的 NSLevelIndicator 没有完全相同的外观,因此如果您希望级别指示器看起来完全相同,则需要实现自定义的 NSLevelIndicatorCell 子类。

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.

月亮邮递员 2024-10-28 18:15:51

在本例中,您看到的图形是带有小凹口条的胶囊形状。指示体积的颜色条是单独绘制的。条形的颜色与渐进高光的颜色相结合,使得条形在高光下方显得更暗。

因此,要重现,您确实需要标准进度条和一张图形。您必须调整颜色才能使条形突出。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文