diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-26 10:52:13 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-26 10:52:13 +0000 |
commit | 7b2694e9f6c35d9f50c3fb3cf38b0fc766478162 (patch) | |
tree | c4e3d07a6bb51de884f53312a96d05849f072db1 /cocoa/PSMTabBarControl/PSMTabDragWindow.m | |
parent | a663cf8f84942e1147d1d2f3db292308639c7fa5 (diff) | |
download | netsurf-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/PSMTabDragWindow.m')
-rw-r--r-- | cocoa/PSMTabBarControl/PSMTabDragWindow.m | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabDragWindow.m b/cocoa/PSMTabBarControl/PSMTabDragWindow.m index 0d07c432d..d6fcc95a3 100644 --- a/cocoa/PSMTabBarControl/PSMTabDragWindow.m +++ b/cocoa/PSMTabBarControl/PSMTabDragWindow.m @@ -11,40 +11,37 @@ @implementation PSMTabDragWindow -+ (PSMTabDragWindow *)dragWindowWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask -{ ++ (PSMTabDragWindow *)dragWindowWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask { return [[[PSMTabDragWindow alloc] initWithImage:image styleMask:styleMask] autorelease]; } -- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask -{ +- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask { NSSize size = [image size]; - - if ( (self = [super initWithContentRect:NSMakeRect(0, 0, size.width, size.height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]) ) { + + if((self = [super initWithContentRect:NSMakeRect(0, 0, size.width, size.height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO])) { _dragView = [[[PSMTabDragView alloc] initWithFrame:NSMakeRect(0, 0, size.width, size.height)] autorelease]; [self setContentView:_dragView]; [self setLevel:NSStatusWindowLevel]; [self setIgnoresMouseEvents:YES]; [self setOpaque:NO]; - + [_dragView setImage:image]; - + //Set the size of the window to be the exact size of the drag image NSRect windowFrame = [self frame]; windowFrame.origin.y += windowFrame.size.height - size.height; windowFrame.size = size; - - if (styleMask | NSBorderlessWindowMask) { + + if(styleMask | NSBorderlessWindowMask) { windowFrame.size.height += 22; } - + [self setFrame:windowFrame display:YES]; } return self; } -- (PSMTabDragView *)dragView -{ +- (PSMTabDragView *)dragView { return _dragView; } |