summaryrefslogtreecommitdiff
path: root/cocoa/PSMTabBarControl/PSMTabDragView.m
diff options
context:
space:
mode:
authorSven Weidauer <sven.weidauer@gmail.com>2011-01-26 10:52:13 +0000
committerSven Weidauer <sven.weidauer@gmail.com>2011-01-26 10:52:13 +0000
commit7b2694e9f6c35d9f50c3fb3cf38b0fc766478162 (patch)
treec4e3d07a6bb51de884f53312a96d05849f072db1 /cocoa/PSMTabBarControl/PSMTabDragView.m
parenta663cf8f84942e1147d1d2f3db292308639c7fa5 (diff)
downloadnetsurf-7b2694e9f6c35d9f50c3fb3cf38b0fc766478162.tar.gz
netsurf-7b2694e9f6c35d9f50c3fb3cf38b0fc766478162.tar.bz2
Updated PSMTabBarControl source code to version from https://github.com/dergraf83/PSMTabBarControl
svn path=/trunk/netsurf/; revision=11490
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMTabDragView.m')
-rw-r--r--cocoa/PSMTabBarControl/PSMTabDragView.m26
1 files changed, 10 insertions, 16 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabDragView.m b/cocoa/PSMTabBarControl/PSMTabDragView.m
index 259116ae8..2c9781dbc 100644
--- a/cocoa/PSMTabBarControl/PSMTabDragView.m
+++ b/cocoa/PSMTabBarControl/PSMTabDragView.m
@@ -12,14 +12,13 @@
@implementation PSMTabDragView
- (id)initWithFrame:(NSRect)frame {
- if ( (self = [super initWithFrame:frame]) ) {
+ if((self = [super initWithFrame:frame])) {
_alpha = 1.0;
- }
- return self;
+ }
+ return self;
}
-- (void)dealloc
-{
+- (void)dealloc {
[_image release];
[_alternateImage release];
[super dealloc];
@@ -32,35 +31,30 @@
NSRect srcRect;
srcRect.origin = NSZeroPoint;
srcRect.size = [_image size];
-
+
[_image drawInRect:[self bounds] fromRect:srcRect operation:NSCompositeSourceOver fraction:primaryAlpha];
srcRect.size = [_alternateImage size];
[_alternateImage drawInRect:[self bounds] fromRect:srcRect operation:NSCompositeSourceOver fraction:alternateAlpha];
}
-- (void)setFadeValue:(CGFloat)value
-{
+- (void)setFadeValue:(CGFloat)value {
_alpha = value;
}
-- (NSImage *)image
-{
+- (NSImage *)image {
return _image;
}
-- (void)setImage:(NSImage *)image
-{
+- (void)setImage:(NSImage *)image {
[_image release];
_image = [image retain];
}
-- (NSImage *)alternateImage
-{
+- (NSImage *)alternateImage {
return _alternateImage;
}
-- (void)setAlternateImage:(NSImage *)image
-{
+- (void)setAlternateImage:(NSImage *)image {
[_alternateImage release];
_alternateImage = [image retain];
}