summaryrefslogtreecommitdiff
path: root/frontends/cocoa/PSMTabBarControl/PSMTabDragView.m
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/cocoa/PSMTabBarControl/PSMTabDragView.m')
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabDragView.m56
1 files changed, 31 insertions, 25 deletions
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabDragView.m b/frontends/cocoa/PSMTabBarControl/PSMTabDragView.m
index 8f901646c..4f6ce9131 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabDragView.m
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabDragView.m
@@ -8,46 +8,52 @@
#import "PSMTabDragView.h"
-
@implementation PSMTabDragView
-- (id)initWithFrame:(NSRect)frame {
- if((self = [super initWithFrame:frame])) {
- _alpha = 1.0;
- }
- return self;
+- (id)initWithFrame:(NSRect)frame
+{
+ if ((self = [super initWithFrame:frame])) {
+ _alpha = 1.0;
+ }
+ return self;
}
-- (void)drawRect:(NSRect)rect {
- //1.0 fade means show the primary image
- //0.0 fade means show the secondary image
- CGFloat primaryAlpha = _alpha + 0.001f, alternateAlpha = 1.001f - _alpha;
- NSRect srcRect;
- srcRect.origin = NSZeroPoint;
- srcRect.size = [_image size];
-
- [_image drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:primaryAlpha];
- srcRect.size = [_alternateImage size];
- [_alternateImage drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:alternateAlpha];
+- (void)drawRect:(NSRect)rect
+{
+ //1.0 fade means show the primary image
+ //0.0 fade means show the secondary image
+ CGFloat primaryAlpha = _alpha + 0.001f, alternateAlpha = 1.001f - _alpha;
+ NSRect srcRect;
+ srcRect.origin = NSZeroPoint;
+ srcRect.size = [_image size];
+
+ [_image drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:primaryAlpha];
+ srcRect.size = [_alternateImage size];
+ [_alternateImage drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:alternateAlpha];
}
-- (void)setFadeValue:(CGFloat)value {
- _alpha = value;
+- (void)setFadeValue:(CGFloat)value
+{
+ _alpha = value;
}
-- (NSImage *)image {
- return _image;
+- (NSImage *)image
+{
+ return _image;
}
-- (void)setImage:(NSImage *)image {
+- (void)setImage:(NSImage *)image
+{
_image = image;
}
-- (NSImage *)alternateImage {
- return _alternateImage;
+- (NSImage *)alternateImage
+{
+ return _alternateImage;
}
-- (void)setAlternateImage:(NSImage *)image {
+- (void)setAlternateImage:(NSImage *)image
+{
_alternateImage = image;
}