mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 21:31:56 +00:00
Fix for bug #27637
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28814 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1949a3ac82
commit
4414d1c038
2 changed files with 21 additions and 9 deletions
|
@ -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>
|
2009-10-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSColor.m (-hash): Turned Richards specific hash method
|
* Source/NSColor.m (-hash): Turned Richards specific hash method
|
||||||
|
|
|
@ -781,7 +781,8 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
= NSInterfaceStyleForKey(@"NSScrollerInterfaceStyle", self);
|
= NSInterfaceStyleForKey(@"NSScrollerInterfaceStyle", self);
|
||||||
|
|
||||||
if (interfaceStyle == NSNextStepInterfaceStyle
|
if (interfaceStyle == NSNextStepInterfaceStyle
|
||||||
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
|
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
||||||
{
|
{
|
||||||
/* NeXTstep style is to scroll to point.
|
/* 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. */
|
/* We use the button offset if we in the NeXTstep interface style. */
|
||||||
if (interfaceStyle == NSNextStepInterfaceStyle
|
if (interfaceStyle == NSNextStepInterfaceStyle
|
||||||
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
|
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
||||||
{
|
{
|
||||||
buttonsWidth = ([isa scrollerWidth] - buttonsOffset);
|
buttonsWidth = ([isa scrollerWidth] - buttonsOffset);
|
||||||
x = y = 1.0;
|
x = y = 1.0;
|
||||||
|
@ -1233,7 +1235,8 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
|
|
||||||
/* calc actual position */
|
/* calc actual position */
|
||||||
if (interfaceStyle == NSNextStepInterfaceStyle
|
if (interfaceStyle == NSNextStepInterfaceStyle
|
||||||
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
|
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
||||||
{
|
{
|
||||||
y += knobPosition + ((_arrowsPosition == NSScrollerArrowsMaxEnd
|
y += knobPosition + ((_arrowsPosition == NSScrollerArrowsMaxEnd
|
||||||
|| _arrowsPosition == NSScrollerArrowsNone)
|
|| _arrowsPosition == NSScrollerArrowsNone)
|
||||||
|
@ -1262,14 +1265,16 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
height -= buttonsSize;
|
height -= buttonsSize;
|
||||||
if ( (interfaceStyle == NSNextStepInterfaceStyle ||
|
if ( (interfaceStyle == NSNextStepInterfaceStyle
|
||||||
interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
&& _arrowsPosition == NSScrollerArrowsMinEnd)
|
|| interfaceStyle == GSWindowMakerInterfaceStyle))
|
||||||
{
|
{
|
||||||
y += buttonsSize;
|
if (_arrowsPosition == NSScrollerArrowsMinEnd)
|
||||||
|
{
|
||||||
|
y += buttonsSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (interfaceStyle != NSNextStepInterfaceStyle
|
else
|
||||||
&& interfaceStyle != GSWindowMakerInterfaceStyle)
|
|
||||||
{
|
{
|
||||||
y += buttonsWidth;
|
y += buttonsWidth;
|
||||||
width = buttonsWidth;
|
width = buttonsWidth;
|
||||||
|
@ -1284,6 +1289,7 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
return NSZeroRect;
|
return NSZeroRect;
|
||||||
}
|
}
|
||||||
else if ((interfaceStyle == NSNextStepInterfaceStyle
|
else if ((interfaceStyle == NSNextStepInterfaceStyle
|
||||||
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
||||||
&& _arrowsPosition == NSScrollerArrowsMaxEnd)
|
&& _arrowsPosition == NSScrollerArrowsMaxEnd)
|
||||||
{
|
{
|
||||||
|
@ -1301,6 +1307,7 @@ static const float buttonsOffset = 2; // buttonsWidth = sw - buttonsOffset
|
||||||
return NSZeroRect;
|
return NSZeroRect;
|
||||||
}
|
}
|
||||||
else if (interfaceStyle == NSNextStepInterfaceStyle
|
else if (interfaceStyle == NSNextStepInterfaceStyle
|
||||||
|
|| interfaceStyle == NSMacintoshInterfaceStyle
|
||||||
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
|| interfaceStyle == GSWindowMakerInterfaceStyle)
|
||||||
{
|
{
|
||||||
if (_arrowsPosition == NSScrollerArrowsMaxEnd)
|
if (_arrowsPosition == NSScrollerArrowsMaxEnd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue