Merge branch 'Aristo2' of 172.21.51.218:amercada/Cappuccino into Aristo2

This commit is contained in:
Antoine Mercadal
2013-01-11 14:05:54 -08:00
2 changed files with 28 additions and 3 deletions
+26 -3
View File
@@ -452,6 +452,8 @@ var bottomHeight = 71;
defaultElementsMargin = [_themeView currentValueForThemeAttribute:@"default-elements-margin"],
panelSize = [[_window contentView] frame].size,
buttonsOriginY,
buttonMarginY,
buttonMarginX,
theme = [self theme],
offsetX;
@@ -469,6 +471,19 @@ var bottomHeight = 71;
offsetX = panelSize.width - inset.right;
switch([_window styleMask])
{
case _CPModalWindowMask:
buttonMarginY = [_themeView currentValueForThemeAttribute:@"modal-window-button-margin-y"];
buttonMarginX = [_themeView currentValueForThemeAttribute:@"modal-window-button-margin-x"];
break;
default:
buttonMarginY = [_themeView currentValueForThemeAttribute:@"standard-window-button-margin-y"];
buttonMarginX = [_themeView currentValueForThemeAttribute:@"standard-window-button-margin-x"];
break;
}
for (var i = [_buttons count] - 1; i >= 0 ; i--)
{
var button = _buttons[i];
@@ -480,7 +495,7 @@ var bottomHeight = 71;
height = CGRectGetHeight(buttonFrame);
offsetX -= width;
[button setFrame:CGRectMake(offsetX, buttonsOriginY, width, height)];
[button setFrame:CGRectMake(offsetX + buttonMarginX, buttonsOriginY + buttonMarginY, width, height)];
offsetX -= 10;
}
@@ -719,7 +734,11 @@ var bottomHeight = 71;
[CPColor blackColor],
[CPFont systemFontOfSize:12.0],
[CPNull null],
0.0
0.0,
0.0,
0.0,
0.0,
0.0,
]
forKeys:[@"size", @"content-inset", @"informative-offset", @"button-offset",
@"message-text-alignment", @"message-text-color", @"message-text-font", @"message-text-shadow-color", @"message-text-shadow-offset",
@@ -737,7 +756,11 @@ var bottomHeight = 71;
@"suppression-button-text-color",
@"suppression-button-text-font",
@"suppression-button-text-shadow-color",
@"suppression-button-text-shadow-offset"
@"suppression-button-text-shadow-offset",
@"modal-window-button-margin-y",
@"modal-window-button-margin-x",
@"standard-window-button-margin-y",
@"standard-window-button-margin-x"
]];
}
+2
View File
@@ -1807,6 +1807,7 @@ var themedButtonValues = nil,
{
var alert = [CPAlert new],
buttonOffset = 10.0,
buttonMarginY = 10.0,
defaultElementsMargin = 3.0,
errorIcon = PatternImage("alert-error.png", 53.0, 46.0),
helpIcon = PatternImage("alert-help.png", 24.0, 24.0),
@@ -1825,6 +1826,7 @@ var themedButtonValues = nil,
themedAlertValues =
[
[@"modal-window-button-margin-y", buttonMarginY],
[@"button-offset", buttonOffset],
[@"content-inset", inset],
[@"default-elements-margin", defaultElementsMargin],