-
Notifications
You must be signed in to change notification settings - Fork 250
Expand file tree
/
Copy pathLKLaunchWindowController.m
More file actions
41 lines (32 loc) · 1.27 KB
/
Copy pathLKLaunchWindowController.m
File metadata and controls
41 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// LKLaunchWindowController.m
// Lookin
//
// Created by Li Kai on 2018/11/3.
// https://lookin.work
//
#import "LKLaunchWindowController.h"
#import "LKLaunchViewController.h"
#import "LKWindow.h"
@interface LKLaunchWindowController ()
@end
@implementation LKLaunchWindowController
- (instancetype)init {
LKWindow *window = [[LKWindow alloc] initWithContentRect: NSMakeRect(0, 0, 252, 400)
styleMask: NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskFullSizeContentView
backing: NSBackingStoreBuffered
defer: YES];
window.backgroundColor = [NSColor clearColor];
window.titlebarAppearsTransparent = YES;
window.movable = YES;
window.movableByWindowBackground = YES;
[window standardWindowButton: NSWindowZoomButton].hidden = YES;
[window center];
if (self = [self initWithWindow:window]) {
_launchViewController = [[LKLaunchViewController alloc] initWithWindow:window];
window.contentView = self.launchViewController.view;
self.contentViewController = self.launchViewController;
}
return self;
}
@end