Permalink
Browse files

Merge pull request #7 from DivineDominion/patch-1

set panel's height every time in -openPanel
  • Loading branch information...
2 parents c10577b + 06c4fe0 commit 599405cb5d4bfc800ef758f67d41631d7aed1413 @shpakovski committed Dec 14, 2013
Showing with 1 addition and 5 deletions.
  1. +1 −5 Popup/PanelController.m
View
@@ -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 599405c

Please sign in to comment.