Click on slot scrolls by a page if in windows insterface style

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-01-06 06:57:50 +00:00
parent 2f75abcf2e
commit f97985f224

View file

@ -697,8 +697,33 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
fromView: nil]];
if (floatValue != _floatValue)
{
[self setFloatValue: floatValue];
[self sendAction: _action to: _target];
NSInterfaceStyle interfaceStyle;
interfaceStyle
= NSInterfaceStyleForKey(@"NSScrollerInterfaceStyle", self);
if (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
{
/* NeXTstep style is to scroll to point.
*/
[self setFloatValue: floatValue];
[self sendAction: _action to: _target];
}
else
{
/* Windows style is to scroll by a page.
*/
if (floatValue > _floatValue)
{
_hitPart = NSScrollerIncrementPage;
}
else
{
_hitPart = NSScrollerDecrementPage;
}
[self sendAction: _action to: _target];
}
}
[self trackKnob: theEvent];
break;