Revision: 2906
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2906&view=rev
Author:   hofman
Date:     2007-09-12 03:02:33 -0700 (Wed, 12 Sep 2007)

Log Message:
-----------
Don't use transparent background color for field editor, as the black 
background shines through.

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2007-09-12 09:36:12 UTC (rev 2905)
+++ trunk/SKPDFView.m   2007-09-12 10:02:33 UTC (rev 2906)
@@ -1958,9 +1958,14 @@
 }
 
 - (NSColor *)control:(NSControl *)control 
backgroundColorForFieldEditor:(NSText *)textObj {
-    if (editAnnotation)
-        return [activeAnnotation color];
-    return nil;
+    NSColor *color = nil;
+    if (editAnnotation) {
+        color = [activeAnnotation color];
+        float alpha = [color alphaComponent];
+        if (alpha < 1.0)
+            color = [[NSColor controlBackgroundColor] 
blendedColorWithFraction:alpha ofColor:[color colorWithAlphaComponent:1.0]];
+    }
+    return color;
 }
 
 - (void)selectNextActiveAnnotation:(id)sender {


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to