Skip to content

Commit

Permalink
Give the user a more useful frame on first launch.
Browse files Browse the repository at this point in the history
  • Loading branch information
akitchen committed Jul 12, 2015
1 parent 32b43ac commit d9c03b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions keycastr/KCDefaultVisualizer.m
Expand Up @@ -81,7 +81,8 @@ -(void) _createVisualizerWindow
{
if (visualizerWindow == nil)
{
NSRect frameRect = NSMakeRect(0,100,1600,100);
NSRect screenFrame = [NSScreen mainScreen].frame;
NSRect frameRect = NSMakeRect(0, 100, NSWidth(screenFrame), 100);
visualizerWindow = [[[KCDefaultVisualizerWindow alloc]
initWithContentRect:frameRect
styleMask:NSBorderlessWindowMask
Expand Down Expand Up @@ -144,10 +145,7 @@ -(id) initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backi

_runningAnimations = [[NSMutableArray alloc] init];

NSScreen *screen = [NSScreen mainScreen];
NSRect screenFrame = [screen frame];

NSRect frame = NSMakeRect(screenFrame.size.width-contentRect.size.width-10, 10, contentRect.size.width, contentRect.size.height);
NSRect frame = NSMakeRect(10, 10, contentRect.size.width, contentRect.size.height);

[self setFrame:frame display:NO];
[self setFrameUsingName:@"KCBezelWindow default.bezelWindow"];
Expand Down

0 comments on commit d9c03b3

Please sign in to comment.