winemac: Move some state-based feature adjustment into the -adjustFeaturesForState method.
This commit is contained in:
parent
2d1396af32
commit
5f7b30aee2
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue