mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
MacPF: Add a small group header in front of the outline
This has to be part of the data source, which makes things a bit annoying. For PDFs that have no outline, it says "(No outline)".
This commit is contained in:
parent
fee50cb387
commit
a75f876ec0
3 changed files with 41 additions and 2 deletions
|
@ -69,6 +69,7 @@
|
|||
{
|
||||
_outlineView = [[NSOutlineView alloc] initWithFrame:NSZeroRect];
|
||||
|
||||
_outlineView.floatsGroupRows = NO;
|
||||
_outlineView.focusRingType = NSFocusRingTypeNone;
|
||||
_outlineView.headerView = nil;
|
||||
|
||||
|
@ -179,6 +180,16 @@
|
|||
|
||||
#pragma mark - NSOutlineViewDelegate
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView*)outlineView isGroupItem:(id)item
|
||||
{
|
||||
return [item isGroupItem];
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView*)outlineView shouldSelectItem:(id)item
|
||||
{
|
||||
return ![self outlineView:outlineView isGroupItem:item];
|
||||
}
|
||||
|
||||
// "This method is required if you wish to turn on the use of NSViews instead of NSCells."
|
||||
- (NSView*)outlineView:(NSOutlineView*)outlineView viewForTableColumn:(NSTableColumn*)tableColumn item:(id)item
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue