Skip to content

Commit

Permalink
Hide popup windows when creating them to avoid the jump. Fade them in…
Browse files Browse the repository at this point in the history
… quickly to add a touch of class.
  • Loading branch information
gnachman committed Jul 8, 2015
1 parent f203063 commit ccdde47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/Popup.m
Expand Up @@ -98,8 +98,14 @@ - (void)popWithDelegate:(id<PopupDelegate>)delegate
self.delegate = delegate;

[[self window] setParentWindow:delegate.popupWindowController.window];
self.window.alphaValue = 0;
[self showWindow:delegate.popupWindowController];
[[self window] makeKeyAndOrderFront:delegate.popupWindowController];

[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.15];
self.window.animator.alphaValue = 1;
[NSAnimationContext endGrouping];
}

- (PopupModel*)unfilteredModel
Expand Down

0 comments on commit ccdde47

Please sign in to comment.