winemac: Move some state-based feature adjustment into the -adjustFeaturesForState method.

This commit is contained in:
Ken Thomases 2013-12-29 21:33:20 -06:00 committed by Alexandre Julliard
parent 2d1396af32
commit 5f7b30aee2
1 changed files with 12 additions and 12 deletions

View File

@ -630,6 +630,18 @@ - (void) adjustFeaturesForState
if ([self collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary)
[[self standardWindowButton:NSWindowFullScreenButton] setEnabled:!self.disabled];
}
if (disabled)
{
NSSize size = [self contentRectForFrameRect:[self frame]].size;
[self setContentMinSize:size];
[self setContentMaxSize:size];
}
else
{
[self setContentMaxSize:savedContentMaxSize];
[self setContentMinSize:savedContentMinSize];
}
}
- (void) adjustFullScreenBehavior:(NSWindowCollectionBehavior)behavior
@ -1275,18 +1287,6 @@ - (void) setDisabled:(BOOL)newValue
{
disabled = newValue;
[self adjustFeaturesForState];
if (disabled)
{
NSSize size = [self contentRectForFrameRect:[self frame]].size;
[self setContentMinSize:size];
[self setContentMaxSize:size];
}
else
{
[self setContentMaxSize:savedContentMaxSize];
[self setContentMinSize:savedContentMinSize];
}
}
}