Revision: 4014
http://skim-app.svn.sourceforge.net/skim-app/?rev=4014&view=rev
Author: hofman
Date: 2008-06-13 05:01:41 -0700 (Fri, 13 Jun 2008)
Log Message:
-----------
Reset gradient layer when frame and/or size changes, as the different methods
don't go through a common setter.
Modified Paths:
--------------
trunk/SKStatusBar.m
Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2008-06-13 11:59:18 UTC (rev 4013)
+++ trunk/SKStatusBar.m 2008-06-13 12:01:41 UTC (rev 4014)
@@ -111,6 +111,36 @@
[super setBounds:aRect];
}
+- (void)setBoundsSize:(NSSize)aSize
+{
+ // since the gradient is vertical, we only have to reset the layer if the
height changes; for most of our gradient views, this isn't likely to happen
+ if (ABS(aSize.height - NSHeight([self bounds])) > 0.01) {
+ CGLayerRelease(layer);
+ layer = NULL;
+ }
+ [super setBoundsSize:aSize];
+}
+
+- (void)setFrame:(NSRect)aRect
+{
+ // since the gradient is vertical, we only have to reset the layer if the
height changes; for most of our gradient views, this isn't likely to happen
+ if (ABS(NSHeight(aRect) - NSHeight([self frame])) > 0.01) {
+ CGLayerRelease(layer);
+ layer = NULL;
+ }
+ [super setFrame:aRect];
+}
+
+- (void)setFrameSize:(NSSize)aSize
+{
+ // since the gradient is vertical, we only have to reset the layer if the
height changes; for most of our gradient views, this isn't likely to happen
+ if (ABS(aSize.height - NSHeight([self frame])) > 0.01) {
+ CGLayerRelease(layer);
+ layer = NULL;
+ }
+ [super setFrameSize:aSize];
+}
+
- (void)getLeftFrame:(NSRect *)leftFrame rightFrame:(NSRect *)rightFrame {
float leftWidth = [[leftCell stringValue] length] ? [leftCell
cellSize].width : 0.0;
float rightWidth = [[rightCell stringValue] length] ? [rightCell
cellSize].width : 0.0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit