diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2016-04-03 10:06:33 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@abhibeckert.com> | 2016-04-03 10:06:41 +1000 |
commit | 6672e0d55810a7447fd06ef1113ad88473ba7538 (patch) | |
tree | 841c95ecacd2f1d7b34211e95490b130985e2535 /Frameworks/PSMTabBar | |
parent | 128add6d3e731a83d813ad69ee1e773776bb8e69 (diff) | |
download | sequelpro-6672e0d55810a7447fd06ef1113ad88473ba7538.tar.gz sequelpro-6672e0d55810a7447fd06ef1113ad88473ba7538.tar.bz2 sequelpro-6672e0d55810a7447fd06ef1113ad88473ba7538.zip |
fix various compile warnings
Diffstat (limited to 'Frameworks/PSMTabBar')
-rw-r--r-- | Frameworks/PSMTabBar/PSMRolloverButton.h | 14 | ||||
-rw-r--r-- | Frameworks/PSMTabBar/PSMRolloverButton.m | 4 | ||||
-rw-r--r-- | Frameworks/PSMTabBar/PSMTabBarControl.m | 4 | ||||
-rw-r--r-- | Frameworks/PSMTabBar/PSMTabDragAssistant.m | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.h b/Frameworks/PSMTabBar/PSMRolloverButton.h index 3c175119..9f339a50 100644 --- a/Frameworks/PSMTabBar/PSMRolloverButton.h +++ b/Frameworks/PSMTabBar/PSMRolloverButton.h @@ -16,15 +16,19 @@ } // the regular image -- (void)setUsualImage:(NSImage *)newImage; -- (NSImage *)usualImage; +- (void)setUsualImage:(nullable NSImage *)newImage; +- (nullable NSImage *)usualImage; // the rollover image -- (void)setRolloverImage:(NSImage *)newImage; -- (NSImage *)rolloverImage; +- (void)setRolloverImage:(nullable NSImage *)newImage; +- (nullable NSImage *)rolloverImage; // tracking rect for mouse events -- (void)rolloverFrameDidChange:(NSNotification *)inNotification; +- (void)rolloverFrameDidChange:(nonnull NSNotification *)inNotification; - (void)addTrackingRect; - (void)removeTrackingRect; + +- (void)mouseEntered:(nullable NSEvent *)theEvent; +- (void)mouseExited:(nullable NSEvent *)theEvent; + @end diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.m b/Frameworks/PSMTabBar/PSMRolloverButton.m index eebbd68e..4ded63b7 100644 --- a/Frameworks/PSMTabBar/PSMRolloverButton.m +++ b/Frameworks/PSMTabBar/PSMRolloverButton.m @@ -124,7 +124,7 @@ } // override for rollover effect -- (void)mouseEntered:(NSEvent *)theEvent; +- (void)mouseEntered:(nullable NSEvent *)theEvent { // set rollover image [self setImage:_rolloverImage]; @@ -132,7 +132,7 @@ [super mouseEntered:theEvent]; } -- (void)mouseExited:(NSEvent *)theEvent; +- (void)mouseExited:(nullable NSEvent *)theEvent { // restore usual image [self setImage:_usualImage]; diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index 9b38d6d1..e9fc6c8b 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -1408,8 +1408,8 @@ return; } - CGFloat dx = fabsf(currentPoint.x - trackingStartPoint.x); - CGFloat dy = fabsf(currentPoint.y - trackingStartPoint.y); + CGFloat dx = fabs(currentPoint.x - trackingStartPoint.x); + CGFloat dy = fabs(currentPoint.y - trackingStartPoint.y); CGFloat distance = sqrtf(dx * dx + dy * dy); if (distance >= 10 && !_didDrag && ![[PSMTabDragAssistant sharedDragAssistant] isDragging] && diff --git a/Frameworks/PSMTabBar/PSMTabDragAssistant.m b/Frameworks/PSMTabBar/PSMTabDragAssistant.m index f10eadd4..a0c694a3 100644 --- a/Frameworks/PSMTabBar/PSMTabDragAssistant.m +++ b/Frameworks/PSMTabBar/PSMTabDragAssistant.m @@ -321,7 +321,6 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; } imageSize = [image size]; - [image setScalesWhenResized:YES]; if (imageSize.width > imageSize.height) { [image setSize:NSMakeSize(125, 125 * (imageSize.height / imageSize.width))]; @@ -657,7 +656,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; - (NSImage *)_imageForViewOfCell:(PSMTabBarCell *)cell styleMask:(NSUInteger *)outMask { - PSMTabBarControl *control = [cell controlView]; + PSMTabBarControl *control = (PSMTabBarControl *)[cell controlView]; NSImage *viewImage = nil; if (outMask) { |