Revision: 15781
          http://sourceforge.net/p/skim-app/code/15781
Author:   hofman
Date:     2025-11-09 22:47:51 +0000 (Sun, 09 Nov 2025)
Log Message:
-----------
Use newer rect edge values

Modified Paths:
--------------
    trunk/NSGeometry_SKExtensions.h
    trunk/SKColorSwatch.m
    trunk/SKLevelIndicator.m
    trunk/SKMainWindowController_FullScreen.m
    trunk/SKNoteOutlineView.m
    trunk/SKNoteTableRowView.m
    trunk/SKPreferenceController.m
    trunk/SKPresentationView.m
    trunk/SKReadingBar.m
    trunk/SKSecondaryPDFView.m
    trunk/SKSideWindow.m
    trunk/SKSnapshotPDFView.m
    trunk/SKStatusBar.m
    trunk/SKTopBarView.m

Modified: trunk/NSGeometry_SKExtensions.h
===================================================================
--- trunk/NSGeometry_SKExtensions.h     2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/NSGeometry_SKExtensions.h     2025-11-09 22:47:51 UTC (rev 15781)
@@ -42,10 +42,10 @@
 
 typedef NS_OPTIONS(NSUInteger, SKRectEdges) {
        SKRectEdgesNone = 0,
-       SKRectEdgesMinX = 1 << NSMinXEdge,
-       SKRectEdgesMinY = 1 << NSMinYEdge,
-       SKRectEdgesMaxX = 1 << NSMaxXEdge,
-       SKRectEdgesMaxY = 1 << NSMaxYEdge,
+       SKRectEdgesMinX = 1 << NSRectEdgeMinX,
+       SKRectEdgesMinY = 1 << NSRectEdgeMinY,
+       SKRectEdgesMaxX = 1 << NSRectEdgeMaxX,
+       SKRectEdgesMaxY = 1 << NSRectEdgeMaxY,
 };
 
 static inline NSPoint SKIntegralPoint(NSPoint point) {

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKColorSwatch.m       2025-11-09 22:47:51 UTC (rev 15781)
@@ -232,7 +232,7 @@
 }
 
 - (NSRect)frameForCollapsedItemViewAtIndex:(NSInteger)anIndex {
-    return SKShrinkRect([self frameForItemViewAtIndex:anIndex], 
DISTANCE_BETWEEN_COLORS, NSMaxXEdge);
+    return SKShrinkRect([self frameForItemViewAtIndex:anIndex], 
DISTANCE_BETWEEN_COLORS, NSRectEdgeMaxX);
 }
 
 - (NSInteger)colorIndexAtPoint:(NSPoint)point {

Modified: trunk/SKLevelIndicator.m
===================================================================
--- trunk/SKLevelIndicator.m    2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKLevelIndicator.m    2025-11-09 22:47:51 UTC (rev 15781)
@@ -66,7 +66,7 @@
         [NSGraphicsContext restoreGraphicsState];
     } else if (NSHeight(cellFrame) <= 2.0 * (cellHeight - EDGE_HEIGHT)) {
         NSRect topFrame, bottomFrame, frame = cellFrame;
-        NSDivideRect(cellFrame, &topFrame, &bottomFrame, floor(0.5 * 
NSHeight(cellFrame)), NSMinYEdge);
+        NSDivideRect(cellFrame, &topFrame, &bottomFrame, floor(0.5 * 
NSHeight(cellFrame)), NSRectEdgeMinY);
         frame.size.height = cellHeight;
         [NSGraphicsContext saveGraphicsState];
         [[NSBezierPath bezierPathWithRect:topFrame] addClip];
@@ -79,8 +79,8 @@
         [NSGraphicsContext restoreGraphicsState];
     } else {
         NSRect topFrame, bottomFrame, restFrame, frame = cellFrame, midFrame;
-        NSDivideRect(cellFrame, &topFrame, &bottomFrame, cellHeight - 
EDGE_HEIGHT, NSMinYEdge);
-        NSDivideRect(bottomFrame, &bottomFrame, &restFrame, cellHeight - 
EDGE_HEIGHT, NSMaxYEdge);
+        NSDivideRect(cellFrame, &topFrame, &bottomFrame, cellHeight - 
EDGE_HEIGHT, NSRectEdgeMinY);
+        NSDivideRect(bottomFrame, &bottomFrame, &restFrame, cellHeight - 
EDGE_HEIGHT, NSRectEdgeMaxY);
         frame.size.height = cellHeight;
         [NSGraphicsContext saveGraphicsState];
         [[NSBezierPath bezierPathWithRect:topFrame] addClip];
@@ -87,7 +87,7 @@
         [super drawInteriorWithFrame:frame inView:controlView];
         [NSGraphicsContext restoreGraphicsState];
         do {
-            NSDivideRect(restFrame, &midFrame, &restFrame, fmin(cellHeight - 
2.0 * EDGE_HEIGHT, NSHeight(restFrame)), NSMinYEdge);
+            NSDivideRect(restFrame, &midFrame, &restFrame, fmin(cellHeight - 
2.0 * EDGE_HEIGHT, NSHeight(restFrame)), NSRectEdgeMinY);
             [NSGraphicsContext saveGraphicsState];
             [[NSBezierPath bezierPathWithRect:midFrame] addClip];
             frame.origin.y = NSMinY(midFrame) - EDGE_HEIGHT;

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2025-11-09 18:17:24 UTC (rev 
15780)
+++ trunk/SKMainWindowController_FullScreen.m   2025-11-09 22:47:51 UTC (rev 
15781)
@@ -621,7 +621,7 @@
             blackLayer = [CALayer layer];
             [blackLayer 
setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
             [blackLayer setZPosition:1.0];
-            [blackLayer setFrame:SKSliceRect([window 
convertRectFromScreen:frame], offset, NSMaxYEdge)];
+            [blackLayer setFrame:SKSliceRect([window 
convertRectFromScreen:frame], offset, NSRectEdgeMaxY)];
             [[[[window contentView] superview] layer] addSublayer:blackLayer];
         }
         for (NSView *view in [[[window 
standardWindowButton:NSWindowCloseButton] superview] subviews]) {

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKNoteOutlineView.m   2025-11-09 22:47:51 UTC (rev 15781)
@@ -125,7 +125,7 @@
         id item = row != -1 ? [self itemAtRow:row] : nil;
         
         if (item) {
-            NSRect rect = SKSliceRect([self rectOfRow:row], 
RESIZE_EDGE_HEIGHT, [self isFlipped] ? NSMaxYEdge : NSMinYEdge);
+            NSRect rect = SKSliceRect([self rectOfRow:row], 
RESIZE_EDGE_HEIGHT, [self isFlipped] ? NSRectEdgeMaxY : NSRectEdgeMinY);
             if (NSMouseInRect(mouseLoc, rect, [self isFlipped]) && [NSApp 
willDragMouse]) {
                 CGFloat startHeight = [self rowHeightForItem:item] ?: 
NSHeight([self rectOfRow:row]) - [self intercellSpacing].height;
                 
@@ -189,7 +189,7 @@
         }
         NSInteger level = [self levelForRow:row];
         if (level > 0 && [self outlineColumnIsFirst])
-            frame = SKShrinkRect(frame, -[self indentationPerLevel] * level, 
NSMinXEdge);
+            frame = SKShrinkRect(frame, -[self indentationPerLevel] * level, 
NSRectEdgeMinX);
         return frame;
     }
     return [super frameOfCellAtColumn:column row:row];

Modified: trunk/SKNoteTableRowView.m
===================================================================
--- trunk/SKNoteTableRowView.m  2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKNoteTableRowView.m  2025-11-09 22:47:51 UTC (rev 15781)
@@ -75,7 +75,7 @@
     if ([ov isKindOfClass:[NSTableView class]] && [ov rowHeight] + [ov 
intercellSpacing].height >= NSHeight([self frame]))
             cursor = [NSCursor resizeDownCursor];
     
-    [self addCursorRect:SKSliceRect([self bounds], RESIZE_EDGE_HEIGHT, [self 
isFlipped] ? NSMaxYEdge : NSMinYEdge) cursor:cursor];
+    [self addCursorRect:SKSliceRect([self bounds], RESIZE_EDGE_HEIGHT, [self 
isFlipped] ? NSRectEdgeMaxY : NSRectEdgeMinY) cursor:cursor];
 }
 
 @end

Modified: trunk/SKPreferenceController.m
===================================================================
--- trunk/SKPreferenceController.m      2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKPreferenceController.m      2025-11-09 22:47:51 UTC (rev 15781)
@@ -111,7 +111,7 @@
         NSView *contentView = [window contentView];
         NSView *oldView = [currentPane view];
         NSView *view = [pane view];
-        NSRect frame = SKShrinkRect([window frame],  NSHeight([contentView 
frame]) - NSHeight([view frame]) - BOTTOM_MARGIN, NSMinYEdge);
+        NSRect frame = SKShrinkRect([window frame],  NSHeight([contentView 
frame]) - NSHeight([view frame]) - BOTTOM_MARGIN, NSRectEdgeMinY);
         
         // make sure edits are committed
         [currentPane commitEditing];
@@ -189,7 +189,7 @@
     view = [currentPane view];
     frame = [window frame];
     frame.size.width = width;
-    frame = SKShrinkRect(frame, NSHeight([[window contentView] frame]) - 
NSHeight([view frame]) - BOTTOM_MARGIN, NSMinYEdge);
+    frame = SKShrinkRect(frame, NSHeight([[window contentView] frame]) - 
NSHeight([view frame]) - BOTTOM_MARGIN, NSRectEdgeMinY);
     [window setFrame:frame display:NO];
     
     [[window contentView] addSubview:view];

Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m  2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKPresentationView.m  2025-11-09 22:47:51 UTC (rev 15781)
@@ -832,7 +832,7 @@
                 navWindow = [[SKNavigationWindow alloc] initWithView:self];
             [navWindow showForWindow:[self window]];
             
NSAccessibilityPostNotificationWithUserInfo(NSAccessibilityUnignoredAncestor(self),
 NSAccessibilityLayoutChangedNotification, [NSDictionary 
dictionaryWithObjectsAndKeys:NSAccessibilityUnignoredChildrenForOnlyChild(navWindow),
 NSAccessibilityUIElementsKey, nil]);
-        } else if (navigationMode == SKNavigationBottom && 
NSPointInRect([theEvent locationInWindow], SKSliceRect([[[self window] 
contentView] frame], NAVIGATION_BOTTOM_EDGE_HEIGHT, NSMinYEdge))) {
+        } else if (navigationMode == SKNavigationBottom && 
NSPointInRect([theEvent locationInWindow], SKSliceRect([[[self window] 
contentView] frame], NAVIGATION_BOTTOM_EDGE_HEIGHT, NSRectEdgeMinY))) {
             [self performSelectorOnce:@selector(showNavWindow) 
afterDelay:SHOW_NAV_DELAY];
         }
     }
@@ -1176,7 +1176,7 @@
 }
 
 - (void)showNavWindow {
-    if ([navWindow isVisible] == NO && NSPointInRect([[self window] 
mouseLocationOutsideOfEventStream], SKSliceRect([[[self window] contentView] 
frame], NAVIGATION_BOTTOM_EDGE_HEIGHT, NSMinYEdge))) {
+    if ([navWindow isVisible] == NO && NSPointInRect([[self window] 
mouseLocationOutsideOfEventStream], SKSliceRect([[[self window] contentView] 
frame], NAVIGATION_BOTTOM_EDGE_HEIGHT, NSRectEdgeMinY))) {
         if (navWindow == nil)
             navWindow = [[SKNavigationWindow alloc] initWithView:self];
         [navWindow showForWindow:[self window]];

Modified: trunk/SKReadingBar.m
===================================================================
--- trunk/SKReadingBar.m        2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKReadingBar.m        2025-11-09 22:47:51 UTC (rev 15781)
@@ -367,11 +367,11 @@
             if (NSEqualRects(rect, NSZeroRect)) {
                 CGContextFillRect(context, NSRectToCGRect(bounds));
             } else if (([pdfPage lineDirectionAngle] % 180)) {
-                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMaxY(bounds) - NSMaxY(rect), NSMaxYEdge)));
-                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMinY(rect) - NSMinY(bounds), NSMinYEdge)));
+                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMaxY(bounds) - NSMaxY(rect), NSRectEdgeMaxY)));
+                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMinY(rect) - NSMinY(bounds), NSRectEdgeMinY)));
             } else {
-                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMaxX(bounds) - NSMaxX(rect), NSMaxXEdge)));
-                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMinX(rect) - NSMinX(bounds), NSMinXEdge)));
+                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMaxX(bounds) - NSMaxX(rect), NSRectEdgeMaxX)));
+                CGContextFillRect(context, NSRectToCGRect(SKSliceRect(bounds, 
NSMinX(rect) - NSMinX(bounds), NSRectEdgeMinX)));
             }
         } else {
             rect = [[self class] bounds:rect forBox:box onPage:pdfPage];

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKSecondaryPDFView.m  2025-11-09 22:47:51 UTC (rev 15781)
@@ -281,7 +281,7 @@
         [self makeControls];
     
     NSRect rect = [self bounds];
-    rect = SKSliceRect(rect, NSHeight([controlView frame]), [self isFlipped] ? 
NSMinYEdge : NSMaxYEdge);
+    rect = SKSliceRect(rect, NSHeight([controlView frame]), [self isFlipped] ? 
NSRectEdgeMinY : NSRectEdgeMaxY);
     [controlView setFrame:rect];
     [controlView setAlphaValue:0.0];
     [self addSubview:controlView positioned:NSWindowAbove relativeTo:nil];
@@ -329,7 +329,7 @@
         [self removeTrackingArea:trackingArea];
     NSRect rect = [self bounds];
     if (NSHeight(rect) > CONTROL_HEIGHT) {
-        rect = SKSliceRect(rect, CONTROL_HEIGHT, [self isFlipped] ? NSMinYEdge 
: NSMaxYEdge);
+        rect = SKSliceRect(rect, CONTROL_HEIGHT, [self isFlipped] ? 
NSRectEdgeMinY : NSRectEdgeMaxY);
         trackingArea = [[NSTrackingArea alloc] initWithRect:rect 
options:NSTrackingActiveInKeyWindow | NSTrackingMouseEnteredAndExited 
owner:self userInfo:nil];
         [self addTrackingArea:trackingArea];
     }

Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m        2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKSideWindow.m        2025-11-09 22:47:51 UTC (rev 15781)
@@ -63,7 +63,7 @@
 - (void)contentViewFrameChanged:(NSNotification *)notification {
     NSVisualEffectView *contentView = (NSVisualEffectView *)[self contentView];
     NSImage *mask = [NSImage imageWithSize:[contentView bounds].size 
drawingHandler:^(NSRect r){
-        NSBezierPath *path = [NSBezierPath 
bezierPathWithRoundedRect:SKShrinkRect(r, -CORNER_RADIUS, NSMinXEdge) 
xRadius:CORNER_RADIUS yRadius:CORNER_RADIUS];
+        NSBezierPath *path = [NSBezierPath 
bezierPathWithRoundedRect:SKShrinkRect(r, -CORNER_RADIUS, NSRectEdgeMinX) 
xRadius:CORNER_RADIUS yRadius:CORNER_RADIUS];
         [[NSColor blackColor] set];
         [path fill];
         return YES;
@@ -103,7 +103,7 @@
             [self setContentView:backgroundView];
         }
         
-        NSRect contentRect = SKShrinkRect(NSInsetRect([backgroundView bounds], 
0.0, CONTENT_INSET), CONTENT_INSET, NSMaxXEdge);
+        NSRect contentRect = SKShrinkRect(NSInsetRect([backgroundView bounds], 
0.0, CONTENT_INSET), CONTENT_INSET, NSRectEdgeMaxX);
         mainContentView = [[NSView alloc] initWithFrame:contentRect];
         [mainContentView setAutoresizingMask:NSViewMinXMargin | 
NSViewHeightSizable];
         [backgroundView addSubview:mainContentView];
@@ -124,7 +124,7 @@
 - (void)attachToWindow:(NSWindow *)window {
     NSRect frame;
     NSRect screenFrame = [[window screen] frame];
-    frame = SKSliceRect(screenFrame, WINDOW_OFFSET, NSMinXEdge);
+    frame = SKSliceRect(screenFrame, WINDOW_OFFSET, NSRectEdgeMinX);
     [self setFrame:NSInsetRect(frame, 0.0, WINDOW_INSET) display:NO];
     [self setLevel:[window level]];
     [self orderFront:nil];
@@ -221,13 +221,13 @@
 @implementation SKSideWindowContentView
 
 - (NSRect)resizeHandleRect {
-    return SKSliceRect([self bounds], CONTENT_INSET, NSMaxXEdge);
+    return SKSliceRect([self bounds], CONTENT_INSET, NSRectEdgeMaxX);
 }
 
 - (void)drawRect:(NSRect)aRect {
     NSRect rect = [self bounds];
-    NSRect topRect = SKSliceRect(rect, CORNER_RADIUS, NSMaxYEdge);
-    NSRect bottomRect = SKSliceRect(rect, CORNER_RADIUS, NSMinYEdge);
+    NSRect topRect = SKSliceRect(rect, CORNER_RADIUS, NSRectEdgeMaxY);
+    NSRect bottomRect = SKSliceRect(rect, CORNER_RADIUS, NSRectEdgeMinY);
     NSSize offset = NSZeroSize;
     NSBezierPath *path = [NSBezierPath bezierPathWithRect:rect];
     NSColor *backgroundColor = [NSColor windowBackgroundColor];
@@ -238,7 +238,7 @@
     [NSGraphicsContext saveGraphicsState];
     
     [path addClip];
-    rect = SKShrinkRect(rect, -CORNER_RADIUS, NSMinXEdge);
+    rect = SKShrinkRect(rect, -CORNER_RADIUS, NSRectEdgeMinX);
     [[NSBezierPath bezierPathWithRoundedRect:rect xRadius:CORNER_RADIUS 
yRadius:CORNER_RADIUS] addClip];
     if ([[self window] contentView] == self) {
         [backgroundColor set];

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKSnapshotPDFView.m   2025-11-09 22:47:51 UTC (rev 15781)
@@ -186,7 +186,7 @@
         [self makeScalePopUpButton];
     
     NSRect rect = [self bounds];
-    rect = SKSliceRect(rect, NSHeight([controlView frame]), [self isFlipped] ? 
NSMinYEdge : NSMaxYEdge);
+    rect = SKSliceRect(rect, NSHeight([controlView frame]), [self isFlipped] ? 
NSRectEdgeMinY : NSRectEdgeMaxY);
     [controlView setFrame:rect];
     [controlView setAlphaValue:0.0];
     [self addSubview:controlView positioned:NSWindowAbove relativeTo:nil];
@@ -235,7 +235,7 @@
         [self removeTrackingArea:trackingArea];
     NSRect rect = [self bounds];
     if (NSHeight(rect) > CONTROL_HEIGHT) {
-        rect = SKSliceRect(rect, CONTROL_HEIGHT, [self isFlipped] ? NSMinYEdge 
: NSMaxYEdge);
+        rect = SKSliceRect(rect, CONTROL_HEIGHT, [self isFlipped] ? 
NSRectEdgeMinY : NSRectEdgeMaxY);
         trackingArea = [[NSTrackingArea alloc] initWithRect:rect 
options:NSTrackingActiveInKeyWindow | NSTrackingMouseEnteredAndExited 
owner:self userInfo:nil];
         [self addTrackingArea:trackingArea];
     }

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKStatusBar.m 2025-11-09 22:47:51 UTC (rev 15781)
@@ -147,11 +147,11 @@
 }
 
 - (CGFloat)windowContentBorderThickness {
-    return [[self window] contentBorderThicknessForEdge:NSMinYEdge];
+    return [[self window] contentBorderThicknessForEdge:NSRectEdgeMinY];
 }
 
 - (void)setWindowContentBorderThickness:(CGFloat)thickness {
-    [[self window] setContentBorderThickness:thickness forEdge:NSMinYEdge];
+    [[self window] setContentBorderThickness:thickness forEdge:NSRectEdgeMinY];
 }
 
 - (void)toggleBelowView:(NSView *)view animate:(BOOL)animate {
@@ -201,12 +201,12 @@
                 animating = NO;
             }];
     } else if (visible == NO) {
-        [[self window] setContentBorderThickness:0.0 forEdge:NSMinYEdge];
+        [[self window] setContentBorderThickness:0.0 forEdge:NSRectEdgeMinY];
         [self removeFromSuperview];
         [NSLayoutConstraint activateConstraints:constraints];
         [contentView layoutSubtreeIfNeeded];
     } else {
-        [[self window] setContentBorderThickness:statusHeight 
forEdge:NSMinYEdge];
+        [[self window] setContentBorderThickness:statusHeight 
forEdge:NSRectEdgeMinY];
     }
 }
 

Modified: trunk/SKTopBarView.m
===================================================================
--- trunk/SKTopBarView.m        2025-11-09 18:17:24 UTC (rev 15780)
+++ trunk/SKTopBarView.m        2025-11-09 22:47:51 UTC (rev 15781)
@@ -168,7 +168,7 @@
     NSRect rect = [self bounds];
     NSRect sepRect = NSZeroRect;
     if ([self separatorColor])
-        NSDivideRect(rect, &sepRect, &rect, SEPARATOR_WIDTH, NSMinYEdge);
+        NSDivideRect(rect, &sepRect, &rect, SEPARATOR_WIDTH, NSRectEdgeMinY);
     
     [NSGraphicsContext saveGraphicsState];
     

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to