Skip to content
Browse files

set panel's height every time in -openPanel

fixes #6
  • Loading branch information...
1 parent c10577b commit 06c4fe094a8e1225ce54611d81a0dbf7381fb189 @DivineDominion DivineDominion committed Dec 14, 2013
Showing with 1 addition and 5 deletions.
  1. +1 −5 Popup/PanelController.m
View
6 Popup/PanelController.m
@@ -51,11 +51,6 @@ - (void)awakeFromNib
[panel setOpaque:NO];
[panel setBackgroundColor:[NSColor clearColor]];
- // Resize panel
- NSRect panelRect = [[self window] frame];
- panelRect.size.height = POPUP_HEIGHT;
- [[self window] setFrame:panelRect display:NO];
-
// Follow search string
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(runSearch) name:NSControlTextDidChangeNotification object:self.searchField];
}
@@ -197,6 +192,7 @@ - (void)openPanel
NSRect panelRect = [panel frame];
panelRect.size.width = PANEL_WIDTH;
+ panelRect.size.height = POPUP_HEIGHT;
panelRect.origin.x = roundf(NSMidX(statusRect) - NSWidth(panelRect) / 2);
panelRect.origin.y = NSMaxY(statusRect) - NSHeight(panelRect);

0 comments on commit 06c4fe0

Please sign in to comment.
Something went wrong with that request. Please try again.