-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed incorrect table header height in manifest editor on OS X 10.10 …
…and earlier.
- Loading branch information
1 parent
bada32d
commit 13a460a
Showing
4 changed files
with
67 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// MATableHeaderView.h | ||
// MunkiAdmin | ||
// | ||
// Created by Hannes Juutilainen on 22.10.2015. | ||
// | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface MATableHeaderView : NSTableHeaderView | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// MATableHeaderView.m | ||
// MunkiAdmin | ||
// | ||
// Created by Hannes Juutilainen on 22.10.2015. | ||
// | ||
// | ||
|
||
#import "MATableHeaderView.h" | ||
|
||
@implementation MATableHeaderView | ||
|
||
- (void)drawRect:(NSRect)dirtyRect | ||
{ | ||
[super drawRect:dirtyRect]; | ||
} | ||
|
||
- (NSRect)frame | ||
{ | ||
/* | ||
Override table view header height on OS X 10.10 and earlier | ||
Based on http://stackoverflow.com/questions/32712561/backward-compatibility-of-header-hight-of-nstableview-with-os-x-10-11 | ||
*/ | ||
NSRect fixedFrame = [super frame]; | ||
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_10_Max) { | ||
/* on a 10.10.x system */ | ||
fixedFrame.size.height = 17; | ||
} else { | ||
/* 10.11 or later system */ | ||
} | ||
return fixedFrame; | ||
} | ||
|
||
|
||
@end |