New: CPThemeStateKeyWindow for CPView.

Every view in the key window now takes on the 'key window' theme state. This makes it easy to theme everything in inactive windows in more muted colours. Also, combined with the first responder theme state of the previous commit we can have visuals like "first responder but in an inactive window" for text views and such things.
This commit is contained in:
Alexander Ljungberg
2014-05-11 15:51:17 +01:00
parent 050fcf2ab8
commit 025a43ea4e
3 changed files with 47 additions and 0 deletions
+2
View File
@@ -1965,6 +1965,7 @@ CPTexturedBackgroundWindowMask
_hasBecomeKeyWindow = YES;
[_windowView noteKeyWindowStateChanged];
[_contentView _notifyWindowDidBecomeKey];
[[CPNotificationCenter defaultCenter]
postNotificationName:CPWindowDidBecomeKeyNotification
@@ -2033,6 +2034,7 @@ CPTexturedBackgroundWindowMask
CPApp._keyWindow = nil;
[_windowView noteKeyWindowStateChanged];
[_contentView _notifyWindowDidResignKey];
[[CPNotificationCenter defaultCenter]
postNotificationName:CPWindowDidResignKeyNotification