Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Position positioningRect using -alignmentRectForFrame:
Browse files Browse the repository at this point in the history
  • Loading branch information
joshvera committed Apr 8, 2014
1 parent 4366d3e commit 4a2b244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Rebel/RBLPopover.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ - (void)showRelativeToRect:(CGRect)positioningRect ofView:(NSView *)positioningV
positioningRect = [positioningView bounds];
}

NSRect windowRelativeRect = [positioningView convertRect:positioningRect toView:nil];
NSRect windowRelativeRect = [positioningView convertRect:[positioningView alignmentRectForFrame:positioningRect] toView:nil];
CGRect screenRect = [positioningView.window convertRectToScreen:windowRelativeRect];

self.backgroundView.popoverOrigin = screenRect;
Expand Down

0 comments on commit 4a2b244

Please sign in to comment.