mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22: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
5f2896b675
commit
3dd7a35157
1 changed files with 27 additions and 2 deletions
|
@ -697,8 +697,33 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
fromView: nil]];
|
fromView: nil]];
|
||||||
if (floatValue != _floatValue)
|
if (floatValue != _floatValue)
|
||||||
{
|
{
|
||||||
[self setFloatValue: floatValue];
|
NSInterfaceStyle interfaceStyle;
|
||||||
[self sendAction: _action to: _target];
|
|
||||||
|
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];
|
[self trackKnob: theEvent];
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue