git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28814 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-10-12 16:42:45 +00:00
parent 462c1a00f9
commit d91f2c8dae
2 changed files with 21 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2009-10-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSScroller.m: Handle NSMacintoshInterfaceStyle the same
as NSNextStepInterfaceStyle.
2009-10-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSColor.m (-hash): Turned Richards specific hash method

View file

@ -781,7 +781,8 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
= NSInterfaceStyleForKey(@"NSScrollerInterfaceStyle", self);
if (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
{
/* NeXTstep style is to scroll to point.
*/
@ -1159,7 +1160,8 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
}
/* We use the button offset if we in the NeXTstep interface style. */
if (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
{
buttonsWidth = ([isa scrollerWidth] - buttonsOffset);
x = y = 1.0;
@ -1233,7 +1235,8 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
/* calc actual position */
if (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
{
y += knobPosition + ((_arrowsPosition == NSScrollerArrowsMaxEnd
|| _arrowsPosition == NSScrollerArrowsNone)
@ -1262,14 +1265,16 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
break;
}
height -= buttonsSize;
if ( (interfaceStyle == NSNextStepInterfaceStyle ||
interfaceStyle == GSWindowMakerInterfaceStyle)
&& _arrowsPosition == NSScrollerArrowsMinEnd)
if ( (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle))
{
y += buttonsSize;
if (_arrowsPosition == NSScrollerArrowsMinEnd)
{
y += buttonsSize;
}
}
else if (interfaceStyle != NSNextStepInterfaceStyle
&& interfaceStyle != GSWindowMakerInterfaceStyle)
else
{
y += buttonsWidth;
width = buttonsWidth;
@ -1284,6 +1289,7 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
return NSZeroRect;
}
else if ((interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
&& _arrowsPosition == NSScrollerArrowsMaxEnd)
{
@ -1301,6 +1307,7 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
return NSZeroRect;
}
else if (interfaceStyle == NSNextStepInterfaceStyle
|| interfaceStyle == NSMacintoshInterfaceStyle
|| interfaceStyle == GSWindowMakerInterfaceStyle)
{
if (_arrowsPosition == NSScrollerArrowsMaxEnd)