Revision: 5322
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5322&view=rev
Author:   hofman
Date:     2009-04-18 23:40:35 +0000 (Sat, 18 Apr 2009)

Log Message:
-----------
source list highlight colors depend on both the main and the key state of the 
window

Modified Paths:
--------------
    trunk/SKThumbnailTableView.m
    trunk/SKTocOutlineView.m

Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m        2009-04-18 23:00:16 UTC (rev 5321)
+++ trunk/SKThumbnailTableView.m        2009-04-18 23:40:35 UTC (rev 5322)
@@ -109,12 +109,12 @@
     if (supportsSourceList) {
         CGFloat *rgb;
         BOOL isGraphite = [NSColor currentControlTint] == 
NSGraphiteControlTint;
-        if ([[self window] isMainWindow] == NO)
-            rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
-        else if ([[self window] isKeyWindow] && [[self window] firstResponder] 
== self)
+        if ([[self window] isKeyWindow] && [[self window] firstResponder] == 
self)
             rgb = isGraphite ? keyColorGraphite : keyColorBlue;
+        else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
+            rgb = isGraphite ? mainColorGraphite : mainColorBlue;
         else
-            rgb = isGraphite ? mainColorGraphite : mainColorBlue;
+            rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
         color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2] 
alpha:1.0];
     } else {
         if ([[self window] isMainWindow] && [[self window] firstResponder] == 
self)

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2009-04-18 23:00:16 UTC (rev 5321)
+++ trunk/SKTocOutlineView.m    2009-04-18 23:40:35 UTC (rev 5322)
@@ -89,12 +89,12 @@
     if (supportsSourceList) {
         CGFloat *rgb;
         BOOL isGraphite = [NSColor currentControlTint] == 
NSGraphiteControlTint;
-        if ([[self window] isMainWindow] == NO)
-            rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
-        else if ([[self window] isKeyWindow] && [[self window] firstResponder] 
== self)
+        if ([[self window] isKeyWindow] && [[self window] firstResponder] == 
self)
             rgb = isGraphite ? keyColorGraphite : keyColorBlue;
+        else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
+            rgb = isGraphite ? mainColorGraphite : mainColorBlue;
         else
-            rgb = isGraphite ? mainColorGraphite : mainColorBlue;
+            rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
         color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2] 
alpha:1.0];
     } else {
         if ([[self window] isKeyWindow] && [[self window] firstResponder] == 
self)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to