diff options
Diffstat (limited to 'Low Battery Yup d/FakeAlert.m')
| -rw-r--r-- | Low Battery Yup d/FakeAlert.m | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Low Battery Yup d/FakeAlert.m b/Low Battery Yup d/FakeAlert.m new file mode 100644 index 0000000..ef504a6 --- /dev/null +++ b/Low Battery Yup d/FakeAlert.m @@ -0,0 +1,29 @@ +// +// FakeAlert.m +// Low Battery Yup.d +// +// Created by TW on 12/2/16. +// Copyright (c) 2016 TW. All rights reserved. +// + +#import "FakeAlert.h" + +@implementation FakeAlert + +- (NSRect)frame +{ + NSWindow *window = [[NSWindow alloc] + initWithContentRect:NSMakeRect(0, 0, LOW_BATTERY_ALERT_WIDTH, LOW_BATTERY_ALERT_HEIGHT) + styleMask:NSTitledWindowMask + backing:NSBackingStoreBuffered + defer:YES]; + [window center]; + + NSRect frame = [window frame]; + + [window release]; + + return frame; +} + +@end |
