Add one line of margin below tab views

At least on macOS 10.14 the auxiliary titlebar view is placed so that the bottom line of the view overlaps with the divider that separates the titlebar from the window content.

While the tab view background color is using alpha, the divider was still visible, but it didn’t look that good when using the light appearance.
This commit is contained in:
Allan Odgaard
2018-12-02 23:30:07 +07:00
parent 66b1eb906a
commit dd77fcd6e1

View File

@@ -297,8 +297,8 @@ static void* kOakTabViewSelectedContext = &kOakTabViewSelectedContext;
[self addConstraints:_overflowButtonConstraints];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[overflow]|" options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[close]-(5)-|" options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[title]-(4)-|" options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[close]-(4)-|" options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[title]-(3)-|" options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[overflow]|" options:0 metrics:nil views:views]];
[_textField setContentHuggingPriority:NSLayoutPriorityRequired forOrientation:NSLayoutConstraintOrientationHorizontal];
@@ -1342,7 +1342,7 @@ static void* kOakTabViewSelectedContext = &kOakTabViewSelectedContext;
[tabView removeFromSuperview];
NSRect createNewTabButtonFrame = _createNewTabButton.frame;
CGFloat x = -1, y = NSMinY(self.bounds), height = NSHeight(self.bounds);
CGFloat x = -1, y = NSMinY(self.bounds)+1, height = NSHeight(self.bounds)-1;
for(OakTabFrame* tabFrame in _currentLayout)
{