mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 05:10:58 +00:00
Fixup coordinated of cursor hotpoint for MacOS-X compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25631 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
82dc075f6c
commit
db3d8f04bf
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-11-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSCursor.m: ([-initWithImage:]) changed to use a hot point
|
||||||
|
at 0,0 rather than 0,15 for MacOS-X compatibility ... the coordinate
|
||||||
|
system of a cursor is flipped according to the MacOS-X docs.
|
||||||
|
|
||||||
2007-11-27 Fred Kiefer <FredKiefer@gmx.de>
|
2007-11-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSApplication.m (-replyToApplicationShouldTerminate:):
|
* Source/NSApplication.m (-replyToApplicationShouldTerminate:):
|
||||||
|
|
|
@ -309,21 +309,23 @@ NSCursor *getStandardCursor(NSString *name, int style)
|
||||||
*/
|
*/
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
return [self initWithImage: nil hotSpot: NSMakePoint(0,15)];
|
return [self initWithImage: nil hotSpot: NSMakePoint(0,0)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
|
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
|
||||||
and a hot spot point with x=0 and y=15.</p>
|
and a hot spot point with x=0 and y=0 (top left corner).</p>
|
||||||
<p>See Also: -initWithImage:hotSpot:</p>
|
<p>See Also: -initWithImage:hotSpot:</p>
|
||||||
*/
|
*/
|
||||||
- (id) initWithImage: (NSImage *)newImage
|
- (id) initWithImage: (NSImage *)newImage
|
||||||
{
|
{
|
||||||
return [self initWithImage: newImage
|
return [self initWithImage: newImage
|
||||||
hotSpot: NSMakePoint(0,15)];
|
hotSpot: NSZeroPoint];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
|
/**<p>Initializes and returns a new NSCursor with a NSImage <var>newImage</var>
|
||||||
and the hot spot to <var>hotSpot</var>.</p>
|
and the hot spot to <var>hotSpot</var>.</p>
|
||||||
|
<p>NB. The coordinate system of an NSCursor is flipped, so a hotSpot at
|
||||||
|
0,0 is in the top left corner of the cursor.</p>
|
||||||
<p>See Also: -initWithImage: -setImage:</p>
|
<p>See Also: -initWithImage: -setImage:</p>
|
||||||
*/
|
*/
|
||||||
- (id) initWithImage: (NSImage *)newImage hotSpot: (NSPoint)hotSpot
|
- (id) initWithImage: (NSImage *)newImage hotSpot: (NSPoint)hotSpot
|
||||||
|
@ -360,7 +362,9 @@ backgroundColorHint:(NSColor *)bg
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**<p>Returns the hot spot point of the NSCursor</p>
|
/**<p>Returns the hot spot point of the NSCursor. This is in the
|
||||||
|
* cursor's coordinate system which is a flipped on (origin at the
|
||||||
|
* top left of the cursor).</p>
|
||||||
*/
|
*/
|
||||||
- (NSPoint) hotSpot
|
- (NSPoint) hotSpot
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue