Revision: 14097
http://sourceforge.net/p/skim-app/code/14097
Author: hofman
Date: 2024-03-10 17:47:08 +0000 (Sun, 10 Mar 2024)
Log Message:
-----------
macro for inset to hide border
Modified Paths:
--------------
trunk/SKSideViewController.m
Modified: trunk/SKSideViewController.m
===================================================================
--- trunk/SKSideViewController.m 2024-03-10 17:09:15 UTC (rev 14096)
+++ trunk/SKSideViewController.m 2024-03-10 17:47:08 UTC (rev 14097)
@@ -45,6 +45,7 @@
#import "NSView_SKExtensions.h"
#define DURATION 0.7
+#define BORDER_INSET 1.0
@implementation SKSideViewController
@@ -66,7 +67,7 @@
- (void)setTopInset:(CGFloat)topInset {
[topConstraint setConstant:topInset];
- NSEdgeInsets insets = NSEdgeInsetsMake(topInset + NSHeight([topBar frame])
+ 1.0, 1.0, 1.0, 1.0);
+ NSEdgeInsets insets = NSEdgeInsetsMake(topInset + NSHeight([topBar frame])
+ BORDER_INSET, BORDER_INSET, BORDER_INSET, BORDER_INSET);
for (NSTableView *view in [self tableViews]) {
NSScrollView *scrollView = [view enclosingScrollView];
[scrollView setAutomaticallyAdjustsContentInsets:NO];
@@ -110,10 +111,10 @@
[newView setFrame:[oldView frame]];
NSArray *constraints = @[
- [[newView leadingAnchor] constraintEqualToAnchor:[contentView
leadingAnchor] constant:-1.0],
- [[contentView trailingAnchor] constraintEqualToAnchor:[newView
trailingAnchor] constant:-1.0],
- [[newView topAnchor] constraintEqualToAnchor:[contentView topAnchor]
constant:-1.0],
- [[contentView bottomAnchor] constraintEqualToAnchor:[newView
bottomAnchor] constant:-1.0]];
+ [[newView leadingAnchor] constraintEqualToAnchor:[contentView
leadingAnchor] constant:-BORDER_INSET],
+ [[contentView trailingAnchor] constraintEqualToAnchor:[newView
trailingAnchor] constant:-BORDER_INSET],
+ [[newView topAnchor] constraintEqualToAnchor:[contentView topAnchor]
constant:-BORDER_INSET],
+ [[contentView bottomAnchor] constraintEqualToAnchor:[newView
bottomAnchor] constant:-BORDER_INSET]];
if (animate == NO) {
[contentView replaceSubview:oldView with:newView];
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