mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Let ProjectLayoutView setup height of file browser header
This commit is contained in:
@@ -64,34 +64,12 @@ static NSPopUpButton* OakCreateFolderPopUpButton ()
|
||||
|
||||
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(-3)-[folder(>=75)]-(3)-[divider]-(2)-[back(==22)]-(2)-[forward(==back)]-(3)-|" options:0 metrics:nil views:views]];
|
||||
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[folder(==divider,==back,==forward)]|" options:0 metrics:nil views:views]];
|
||||
|
||||
[self userDefaultsDidChange:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDefaultsDidChange:) name:NSUserDefaultsDidChangeNotification object:[NSUserDefaults standardUserDefaults]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)userDefaultsDidChange:(NSNotification*)aNotification
|
||||
{
|
||||
self.matchTabBarHeight = [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsTabsAboveDocumentKey];
|
||||
}
|
||||
|
||||
- (void)setMatchTabBarHeight:(BOOL)flag
|
||||
{
|
||||
if(_matchTabBarHeight != flag)
|
||||
{
|
||||
_matchTabBarHeight = flag;
|
||||
[self invalidateIntrinsicContentSize];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSSize)intrinsicContentSize
|
||||
{
|
||||
return NSMakeSize(NSViewNoInstrinsicMetric, self.matchTabBarHeight ? 21 : 24);
|
||||
return NSMakeSize(NSViewNoInstrinsicMetric, 24);
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user