Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuwei committed Apr 25, 2020
1 parent f91fa51 commit 4da36c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/AnnotationWinController.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ - (void)awakeFromNib {
self.width = 160;
// self.height = 282;

[[self panel] orderFront:nil];
[[self panel] setLevel:CGShieldingWindowLevel() + 1];
[self.panel orderFront:nil];
[self.panel setLevel:CGShieldingWindowLevel() + 1];

// Make sure panel can float over full screen apps
self.panel.collectionBehavior = NSWindowCollectionBehaviorCanJoinAllSpaces;

[self.panel setStyleMask:NSWindowStyleMaskBorderless];

[self performSelector:@selector(hideWindow) withObject:nil afterDelay:0.01];
// [self showWindow:NSMakePoint(10, self.height + 10)]; //for dev debug
}

- (void)showWindow:(NSPoint)origin {
[[self panel] setFrameTopLeftPoint:origin];
[self.panel setFrameTopLeftPoint:origin];

self.panel.alphaValue = 1;
}
Expand Down

0 comments on commit 4da36c8

Please sign in to comment.