aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks')
-rw-r--r--Frameworks/PSMTabBar/PSMRolloverButton.h14
-rw-r--r--Frameworks/PSMTabBar/PSMRolloverButton.m4
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m4
-rw-r--r--Frameworks/PSMTabBar/PSMTabDragAssistant.m3
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) {