|
|
@ -173,18 +173,7 @@ static PanelController *sharedPanel = nil; |
|
|
|
|
|
|
|
|
|
|
|
- (NSRect)statusRectForWindow:(NSWindow *)window |
|
|
|
- (NSRect)statusRectForWindow:(NSWindow *)window |
|
|
|
{ |
|
|
|
{ |
|
|
|
/*Display on currently active monitor*/ |
|
|
|
NSRect screenRect = self.window.frame; |
|
|
|
NSScreen *currentScreen = nil; |
|
|
|
|
|
|
|
for (NSScreen *screen in [NSScreen screens]) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
unsigned int value = [[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; |
|
|
|
|
|
|
|
if (CGDisplayIsActive(value)) { |
|
|
|
|
|
|
|
currentScreen = screen; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSRect screenRect = currentScreen.frame; |
|
|
|
|
|
|
|
NSRect statusRect = NSZeroRect; |
|
|
|
NSRect statusRect = NSZeroRect; |
|
|
|
|
|
|
|
|
|
|
|
StatusItemView *statusItemView = nil; |
|
|
|
StatusItemView *statusItemView = nil; |
|
|
@ -218,18 +207,8 @@ static PanelController *sharedPanel = nil; |
|
|
|
self.reviewView.layer.backgroundColor = (theme.integerValue == 0) ? [NSColor whiteColor].CGColor : [NSColor blackColor].CGColor; |
|
|
|
self.reviewView.layer.backgroundColor = (theme.integerValue == 0) ? [NSColor whiteColor].CGColor : [NSColor blackColor].CGColor; |
|
|
|
|
|
|
|
|
|
|
|
NSWindow *panel = self.window; |
|
|
|
NSWindow *panel = self.window; |
|
|
|
NSScreen *currentScreen = nil; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (NSScreen *screen in [NSScreen screens]) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
unsigned int value = [[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; |
|
|
|
|
|
|
|
if (CGDisplayIsActive(value)) { |
|
|
|
|
|
|
|
currentScreen = screen; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSRect screenRect = currentScreen.frame; |
|
|
|
NSRect screenRect = self.window.frame; |
|
|
|
NSRect statusRect = [self statusRectForWindow:panel]; |
|
|
|
NSRect statusRect = [self statusRectForWindow:panel]; |
|
|
|
|
|
|
|
|
|
|
|
NSRect panelRect = panel.frame; |
|
|
|
NSRect panelRect = panel.frame; |
|
|
|