mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 11:13:50 +00:00
Don't layout CPAlert in layoutSubviews since it's not a real view. This avoids the theme showcase error where the CPAlert windowing code was activated by the theme descriptor setup.
This commit is contained in:
1 parent
ae47ba78cd
commit
447c33b806
1 file changed
+2
-15
+2
-15
@@ -165,9 +165,6 @@ CPCriticalAlertStyle = 2;
|
||||
[contentView addSubview:_messageLabel];
|
||||
[contentView addSubview:_alertImageView];
|
||||
[contentView addSubview:_informativeLabel];
|
||||
|
||||
// For reference: does not actually work since this 'view' is not in the hierarchy.
|
||||
// [self setNeedsLayout];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -219,9 +216,6 @@ CPCriticalAlertStyle = 2;
|
||||
- (void)setAlertStyle:(CPAlertStyle)style
|
||||
{
|
||||
_alertStyle = style;
|
||||
|
||||
// For reference: does not actually work since this 'view' is not in the hierarchy.
|
||||
// [self setNeedsLayout];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -239,9 +233,6 @@ CPCriticalAlertStyle = 2;
|
||||
- (void)setMessageText:(CPString)messageText
|
||||
{
|
||||
[_messageLabel setStringValue:messageText];
|
||||
|
||||
// For reference: does not actually work since this 'view' is not in the hierarchy.
|
||||
// [self setNeedsLayout];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -302,12 +293,9 @@ CPCriticalAlertStyle = 2;
|
||||
[button setKeyEquivalent:nil];
|
||||
|
||||
[_buttons addObject:button];
|
||||
|
||||
// For reference: does not actually work since this 'view' is not in the hierarchy.
|
||||
// [self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
- (void)layoutPanel
|
||||
{
|
||||
if (!_alertPanel)
|
||||
[self _createPanel];
|
||||
@@ -396,7 +384,6 @@ CPCriticalAlertStyle = 2;
|
||||
[button setFrame:CGRectMake(offsetX, buttonY, width, height)];
|
||||
offsetX -= 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -406,7 +393,7 @@ CPCriticalAlertStyle = 2;
|
||||
*/
|
||||
- (void)runModal
|
||||
{
|
||||
[self layoutSubviews];
|
||||
[self layoutPanel];
|
||||
[CPApp runModalForWindow:_alertPanel];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user