MacPDF: Remove outline view header

Just setting headerView to nil removes the header, but also has
the effect of no longer drawing the outline view with a sidebar
background ¯\_(ツ)_/¯.

But also setting drawsBackground to NO on the scroll view restores
the sidebar look, so do that too.

With this, it is no longer necessar to explicitly set style.
The default NSTableViewStyleAutomatic now seems to resolve to
NSTableViewStyleSourceList, so stop explicitly setting it.
(This part has no behavior change.)
This commit is contained in:
Nico Weber 2023-10-08 22:47:10 -04:00 committed by Tim Flynn
parent e7d41480fc
commit 25515322e5

View file

@ -69,8 +69,8 @@
{
_outlineView = [[NSOutlineView alloc] initWithFrame:NSZeroRect];
_outlineView.style = NSTableViewStyleSourceList;
_outlineView.focusRingType = NSFocusRingTypeNone;
_outlineView.headerView = nil;
// FIXME: Implement data source support for autosaveExpandedItems and use that.
@ -83,6 +83,7 @@
NSScrollView* scrollView = [[NSScrollView alloc] initWithFrame:NSZeroRect];
scrollView.hasVerticalScroller = YES;
scrollView.drawsBackground = NO;
scrollView.documentView = _outlineView;
// The scroll view knows to put things only in the safe area, but it doesn't clip to it.