Skip to content

Commit

Permalink
Removed useless code in layoutSubviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Dogild committed Feb 5, 2013
1 parent eb6bade commit 114cd51
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions AppKit/CPWindow/_CPStandardWindowView.j
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@

- (void)_enableSheet:(BOOL)enable
{

[super _enableSheet:enable];

[_headView setHidden:enable];
Expand Down Expand Up @@ -327,6 +326,7 @@

[self tile];
[theWindow setFrame:frame display:NO animate:NO];

[self setNeedsLayout];
}

Expand All @@ -339,22 +339,6 @@

[_minimizeButton setImage:[self valueForThemeAttribute:@"minimize-image-button"]];
[_minimizeButton setAlternateImage:[self valueForThemeAttribute:@"minimize-image-highlighted-button"]];

if (![_headView isHidden])
[_headView setFrame:CGRectMake(0.0, 0.0, CGRectGetWidth(bounds), [self toolbarMaxY])];
else
[_headView setFrame:CGRectMake(0.0, 0.0, CGRectGetWidth(bounds), 0)];

if (![_dividerView isHidden])
[_dividerView setFrame:CGRectMake(0.0, CGRectGetMaxY([_headView frame]), CGRectGetWidth(bounds), 1.0)];
else
[_dividerView setFrame:CGRectMake(0.0, CGRectGetMaxY([_headView frame]), CGRectGetWidth(bounds), 0.0)];

[_dividerView setBackgroundColor:[self valueForThemeAttribute:@"divider-color"]];

var y = CGRectGetMaxY([_dividerView frame]);

[_bodyView setFrame:CGRectMake(0.0, y, CGRectGetWidth(bounds), CGRectGetHeight(bounds) - y)];
[_bodyView setBackgroundColor:[self valueForThemeAttribute:@"body-color"]];

[_headView setNeedsLayout];
Expand Down

0 comments on commit 114cd51

Please sign in to comment.