Ilya Laktyushin
Ilya Laktyushin

Reputation: 380

OS X Lion scroll direction and NSSlider

My application has horizontal NSSlider acting as volume control and now with Lion's new "natural" (inverted) scroll direction it behaves wrong. When you slide to the left it moves to the right and vice versa. According to what I can see in Lion's iTunes Apple planned that it should work the same regardless of this setting, so when you slide to the left it should move the slider to the left and vice versa. So my question is how can I find out that mouse scroll is inverted or it is not? Or maybe I can somehow get raw deltaX/deltaY values, without invention applied?

Upvotes: 4

Views: 571

Answers (1)

Chuck
Chuck

Reputation: 237060

Ask the event if isDirectionInvertedFromDevice, and multiply the delta by -1 if so.

Upvotes: 6

Related Questions