Revision: 3208
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3208&view=rev
Author:   hofman
Date:     2007-11-16 07:14:29 -0800 (Fri, 16 Nov 2007)

Log Message:
-----------
Draw discrete level indicator cell continuous when the number of discrete 
levels becomes too large.

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

Modified: trunk/SKFindTableView.m
===================================================================
--- trunk/SKFindTableView.m     2007-11-16 10:58:49 UTC (rev 3207)
+++ trunk/SKFindTableView.m     2007-11-16 15:14:29 UTC (rev 3208)
@@ -163,10 +163,15 @@
 // Drawing does not restrict the clip, while in discrete style it heavily uses 
gaussian blur, leading to unacceptable slow drawing
 // see <http://toxicsoftware.com/discrete-nslevelindicatorcell-too-slow/>
 - (void)replacementDrawWithFrame:(NSRect)cellFrame inView:(NSView 
*)controlView {
+    BOOL drawDiscreteContinuous = ([self levelIndicatorStyle] == 
NSDiscreteCapacityLevelIndicatorStyle) && ((NSWidth(cellFrame) + 1.0) / [self 
maxValue] < 3.0);
+    if (drawDiscreteContinuous)
+        [self setLevelIndicatorStyle:NSContinuousCapacityLevelIndicatorStyle];
     [NSGraphicsContext saveGraphicsState];
     [[NSBezierPath bezierPathWithRect:cellFrame] addClip];
     originalDrawWithFrameInView(self, _cmd, cellFrame, controlView);
     [NSGraphicsContext restoreGraphicsState];
+    if (drawDiscreteContinuous)
+        [self setLevelIndicatorStyle:NSDiscreteCapacityLevelIndicatorStyle];
 }
 
 @end


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