How to create a thin scroll bar in Mac OS X Lion

1k views Asked by At

How would I go about create a thin scroll bar like in the Stickies app on OSX Lion?

enter image description here

2

There are 2 answers

0
millimoose On

The release notes for Lion's version of AppKit outline when overlay scrollbars are and are not used:

Unless the user overrides scrollbar appearance using System Preferences, the following behavior occurs:

  • If all of the user’s pointing devices support both horizontal and vertical touch scrolling, the scrollbars are hidden during normal use. They appear as an overlay on top of the window’s content while the user is scrolling, and remain visible briefly to allow scrollbar dragging.

  • If the user has at least one external pointing device that does not support scrolling, the scrollbar is displayed at all times and the usable space in the window is reduced, as in previous versions of Mac OS X. (These permanent scrollbars are referred to as legacy scrollbars.)

  • If the user has no external pointing devices attached, the trackpad settings control the scrollbar behavior; if the user has disabled scrolling for the trackpad in System Preferences, legacy scrollbars are used.

Compatibility Note: There are three situations in which legacy scrollbars are used regardless of hardware or preferences:

You should check if all the conditions are met on your machine and in your app.

You could also set the scroller style explicitly using NSScroller setScrollerStyle:, but it's probably better to respect the defaults and user preferences.

0
JWWalker On

If you set the NSScroller to the "small" control size, either in IB or using -setControlSize:, is that not the right thinness?