mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Resolve ambiguous autolayout issues
Most of these layout changes are related to the common pattern we used to set constraints for "dividers", where one of the dividers is specified to be connected to both edges of its superview then setting the other dividers' constraints to have equal widths (e.g., @"H:|[divider(==divider2,==divider3)]"). On 10.12, this now appears to result in ambiguous layout. We can resolve it by connecting at least one of the edges for each divider to its superview.
This commit is contained in:
committed by
Allan Odgaard
parent
a124b494c2
commit
f3cd0b0797
@@ -51,7 +51,7 @@ static void ShowLoadErrorForURL (WebFrame* frame, NSURL* url, NSError* error)
|
||||
|
||||
OakAddAutoLayoutViewsToSuperview([views allValues], self);
|
||||
|
||||
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[webView(==statusBar,==divider)]|" options:NSLayoutFormatAlignAllTop metrics:nil views:views]];
|
||||
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[webView(==statusBar,==divider)]|" options:NSLayoutFormatAlignAllTop metrics:nil views:views]];
|
||||
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[webView(>=10)][divider][statusBar]|" options:NSLayoutFormatAlignAllLeading metrics:nil views:views]];
|
||||
}
|
||||
return self;
|
||||
|
||||
@@ -106,7 +106,7 @@ static NSTextField* OakCreateTextField ()
|
||||
|
||||
NSArray* layout = @[
|
||||
@"H:|-(3)-[back(==22)]-(2)-[forward(==back)]-(2)-[divider]",
|
||||
@"V:|[back(==forward,==divider)]|",
|
||||
@"V:|[back(==forward,==divider)]|", @"V:|[forward]|", @"V:|[divider]|",
|
||||
@"V:[status]-5-|",
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user