mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
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:
parent
2f75abcf2e
commit
f97985f224
1 changed files with 27 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue