Fix hotspot for scaled native custom cursors

This commit is contained in:
David Capello 2016-08-31 12:28:18 -03:00
parent f1f6d0745d
commit 891e660355
2 changed files with 4 additions and 4 deletions

View File

@ -208,8 +208,8 @@ using namespace she;
nsCursor =
[[NSCursor new] initWithImage:image
hotSpot:NSMakePoint(scale*focus.x,
scale*focus.y)];
hotSpot:NSMakePoint(scale*focus.x + scale/2,
scale*focus.y + scale/2)];
}
if (nsCursor)
[self.contentView setCursor:nsCursor];

View File

@ -248,8 +248,8 @@ namespace she {
ICONINFO ii;
ii.fIcon = FALSE;
ii.xHotspot = focus.x * scale;
ii.yHotspot = focus.y * scale;
ii.xHotspot = scale*focus.x + scale/2;
ii.yHotspot = scale*focus.y + scale/2;
ii.hbmMask = hmonobmp;
ii.hbmColor = hbmp;