OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" | 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" |
| 11 #include "chrome/browser/ui/chrome_style.h" |
11 #import "chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.h" | 12 #import "chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.h" |
12 #include "chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h" | 13 #include "chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h" |
13 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" | 14 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" |
14 #include "chrome/browser/ui/chrome_style.h" | |
15 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u
tils.h" | 15 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u
tils.h" |
16 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 16 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
17 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" | 17 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" |
18 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h" | 18 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h" |
| 19 #import "chrome/browser/ui/cocoa/l10n_util.h" |
19 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
20 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
21 #include "skia/ext/skia_utils_mac.h" | 22 #include "skia/ext/skia_utils_mac.h" |
22 #include "ui/base/cocoa/window_size_constants.h" | 23 #include "ui/base/cocoa/window_size_constants.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 const CGFloat kButtonGap = 6.0f; | 28 const CGFloat kButtonGap = 6.0f; |
28 const CGFloat kDialogContentMinWidth = 210.0f; | 29 const CGFloat kDialogContentMinWidth = 210.0f; |
29 const CGFloat kCvcInputWidth = 64.0f; | 30 const CGFloat kCvcInputWidth = 64.0f; |
| 31 const SkColor kPermanentErrorTextColor = SK_ColorWHITE; |
| 32 const SkColor kPermanentErrorBackgroundColor = SkColorSetRGB(0xd3, 0x2f, 0x2f); |
30 const ui::ResourceBundle::FontStyle kProgressFontStyle = | 33 const ui::ResourceBundle::FontStyle kProgressFontStyle = |
31 chrome_style::kTitleFontStyle; | 34 chrome_style::kTitleFontStyle; |
32 const ui::ResourceBundle::FontStyle kErrorFontStyle = | 35 const ui::ResourceBundle::FontStyle kErrorFontStyle = |
33 chrome_style::kTextFontStyle; | 36 chrome_style::kTextFontStyle; |
34 | 37 |
35 } // namespace | 38 } // namespace |
36 | 39 |
37 namespace autofill { | 40 namespace autofill { |
38 | 41 |
39 // static | 42 // static |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 [view_controller_ setProgressOverlayText: | 84 [view_controller_ setProgressOverlayText: |
82 l10n_util::GetStringUTF16( | 85 l10n_util::GetStringUTF16( |
83 IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS)]; | 86 IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS)]; |
84 | 87 |
85 base::MessageLoop::current()->PostDelayedTask( | 88 base::MessageLoop::current()->PostDelayedTask( |
86 FROM_HERE, base::Bind(&CardUnmaskPromptViewBridge::PerformClose, | 89 FROM_HERE, base::Bind(&CardUnmaskPromptViewBridge::PerformClose, |
87 weak_ptr_factory_.GetWeakPtr()), | 90 weak_ptr_factory_.GetWeakPtr()), |
88 base::TimeDelta::FromSeconds(1)); | 91 base::TimeDelta::FromSeconds(1)); |
89 } else { | 92 } else { |
90 [view_controller_ setProgressOverlayText:base::string16()]; | 93 [view_controller_ setProgressOverlayText:base::string16()]; |
91 // TODO(bondd): Views version never hides |errorLabel_|. When Views decides | 94 |
92 // when to hide it then do the same thing here. | 95 if (allow_retry) { |
93 [view_controller_ setRetriableErrorMessage:error_message]; | 96 // TODO(bondd): Views version never hides |errorLabel_|. When Views |
| 97 // decides when to hide it then do the same thing here. |
| 98 [view_controller_ setRetriableErrorMessage:error_message]; |
| 99 } else { |
| 100 [view_controller_ setPermanentErrorMessage:error_message]; |
| 101 } |
94 } | 102 } |
95 } | 103 } |
96 | 104 |
97 void CardUnmaskPromptViewBridge::OnConstrainedWindowClosed( | 105 void CardUnmaskPromptViewBridge::OnConstrainedWindowClosed( |
98 ConstrainedWindowMac* window) { | 106 ConstrainedWindowMac* window) { |
99 if (controller_) | 107 if (controller_) |
100 controller_->OnUnmaskDialogClosed(); | 108 controller_->OnUnmaskDialogClosed(); |
101 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 109 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
102 } | 110 } |
103 | 111 |
104 CardUnmaskPromptController* CardUnmaskPromptViewBridge::GetController() { | 112 CardUnmaskPromptController* CardUnmaskPromptViewBridge::GetController() { |
105 return controller_; | 113 return controller_; |
106 } | 114 } |
107 | 115 |
108 void CardUnmaskPromptViewBridge::PerformClose() { | 116 void CardUnmaskPromptViewBridge::PerformClose() { |
109 constrained_window_->CloseWebContentsModalDialog(); | 117 constrained_window_->CloseWebContentsModalDialog(); |
110 } | 118 } |
111 | 119 |
112 } // autofill | 120 } // autofill |
113 | 121 |
114 #pragma mark CardUnmaskPromptViewCocoa | 122 #pragma mark CardUnmaskPromptViewCocoa |
115 | 123 |
116 @implementation CardUnmaskPromptViewCocoa { | 124 @implementation CardUnmaskPromptViewCocoa { |
| 125 base::scoped_nsobject<NSBox> permanentErrorBox_; |
117 base::scoped_nsobject<NSView> inputRowView_; | 126 base::scoped_nsobject<NSView> inputRowView_; |
118 base::scoped_nsobject<NSView> storageView_; | 127 base::scoped_nsobject<NSView> storageView_; |
119 | 128 |
120 base::scoped_nsobject<NSTextField> titleLabel_; | 129 base::scoped_nsobject<NSTextField> titleLabel_; |
| 130 base::scoped_nsobject<NSTextField> permanentErrorLabel_; |
121 base::scoped_nsobject<NSTextField> instructionsLabel_; | 131 base::scoped_nsobject<NSTextField> instructionsLabel_; |
122 base::scoped_nsobject<NSTextField> cvcInput_; | 132 base::scoped_nsobject<NSTextField> cvcInput_; |
123 base::scoped_nsobject<NSPopUpButton> monthPopup_; | 133 base::scoped_nsobject<NSPopUpButton> monthPopup_; |
124 base::scoped_nsobject<NSPopUpButton> yearPopup_; | 134 base::scoped_nsobject<NSPopUpButton> yearPopup_; |
125 base::scoped_nsobject<NSButton> cancelButton_; | 135 base::scoped_nsobject<NSButton> cancelButton_; |
126 base::scoped_nsobject<NSButton> verifyButton_; | 136 base::scoped_nsobject<NSButton> verifyButton_; |
127 base::scoped_nsobject<NSButton> storageCheckbox_; | 137 base::scoped_nsobject<NSButton> storageCheckbox_; |
128 base::scoped_nsobject<AutofillTooltipController> storageTooltip_; | 138 base::scoped_nsobject<AutofillTooltipController> storageTooltip_; |
129 base::scoped_nsobject<NSTextField> errorLabel_; | 139 base::scoped_nsobject<NSTextField> errorLabel_; |
130 base::scoped_nsobject<NSTextField> progressOverlayLabel_; | 140 base::scoped_nsobject<NSTextField> progressOverlayLabel_; |
131 | 141 |
132 int monthPopupDefaultIndex_; | 142 int monthPopupDefaultIndex_; |
133 int yearPopupDefaultIndex_; | 143 int yearPopupDefaultIndex_; |
134 | 144 |
135 // Owns |self|. | 145 // Owns |self|. |
136 autofill::CardUnmaskPromptViewBridge* bridge_; | 146 autofill::CardUnmaskPromptViewBridge* bridge_; |
137 } | 147 } |
138 | 148 |
139 + (NSPopUpButton*)buildDatePopupWithModel:(ui::ComboboxModel&)model { | 149 + (NSPopUpButton*)buildDatePopupWithModel:(ui::ComboboxModel&)model { |
140 NSPopUpButton* popup = | 150 NSPopUpButton* popup = |
141 [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:NO]; | 151 [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:NO]; |
142 | 152 |
143 for (int i = 0; i < model.GetItemCount(); ++i) { | 153 for (int i = 0; i < model.GetItemCount(); ++i) { |
144 [popup addItemWithTitle:base::SysUTF16ToNSString(model.GetItemAt(i))]; | 154 [popup addItemWithTitle:base::SysUTF16ToNSString(model.GetItemAt(i))]; |
145 } | 155 } |
146 [popup sizeToFit]; | 156 [popup sizeToFit]; |
147 return popup; | 157 return popup; |
148 } | 158 } |
149 | 159 |
150 // Sets |textField|'s frame size to minimum dimensions needed to display its | |
151 // text without exceeding |width|. Text will wrap onto multiple lines if | |
152 // necessary. Frame width may end up being less than |width| if the text fits | |
153 // in a smaller area. | |
154 + (void)sizeTextField:(NSTextField*)textField toFitWidth:(CGFloat)width { | |
155 NSSize frameSize = | |
156 [[textField cell] cellSizeForBounds:NSMakeRect(0, 0, width, CGFLOAT_MAX)]; | |
157 [textField setFrameSize:frameSize]; | |
158 } | |
159 | |
160 // Set |view|'s frame to the minimum dimensions required to contain all of its | 160 // Set |view|'s frame to the minimum dimensions required to contain all of its |
161 // subviews. | 161 // subviews. |
162 + (void)sizeToFitView:(NSView*)view { | 162 + (void)sizeToFitView:(NSView*)view { |
163 NSRect frame = NSZeroRect; | 163 NSRect frame = NSZeroRect; |
164 for (NSView* child in [view subviews]) { | 164 for (NSView* child in [view subviews]) { |
165 frame = NSUnionRect(frame, [child frame]); | 165 frame = NSUnionRect(frame, [child frame]); |
166 } | 166 } |
167 [view setFrame:frame]; | 167 [view setFrame:frame]; |
168 } | 168 } |
169 | 169 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 - (void)setRetriableErrorMessage:(const base::string16&)text { | 202 - (void)setRetriableErrorMessage:(const base::string16&)text { |
203 NSAttributedString* attributedString = | 203 NSAttributedString* attributedString = |
204 constrained_window::GetAttributedLabelString( | 204 constrained_window::GetAttributedLabelString( |
205 SysUTF16ToNSString(text), kErrorFontStyle, NSNaturalTextAlignment, | 205 SysUTF16ToNSString(text), kErrorFontStyle, NSNaturalTextAlignment, |
206 NSLineBreakByWordWrapping); | 206 NSLineBreakByWordWrapping); |
207 [errorLabel_ setAttributedStringValue:attributedString]; | 207 [errorLabel_ setAttributedStringValue:attributedString]; |
208 [self performLayoutAndDisplay:YES]; | 208 [self performLayoutAndDisplay:YES]; |
209 } | 209 } |
210 | 210 |
| 211 - (void)setPermanentErrorMessage:(const base::string16&)text { |
| 212 if (!text.empty()) { |
| 213 if (!permanentErrorBox_) { |
| 214 permanentErrorBox_.reset([[NSBox alloc] initWithFrame:NSZeroRect]); |
| 215 [permanentErrorBox_ setBoxType:NSBoxCustom]; |
| 216 [permanentErrorBox_ setBorderType:NSNoBorder]; |
| 217 [permanentErrorBox_ setTitlePosition:NSNoTitle]; |
| 218 [permanentErrorBox_ setFillColor:gfx::SkColorToCalibratedNSColor( |
| 219 kPermanentErrorBackgroundColor)]; |
| 220 |
| 221 permanentErrorLabel_.reset([constrained_window::CreateLabel() retain]); |
| 222 [permanentErrorLabel_ setAutoresizingMask:NSViewWidthSizable]; |
| 223 [permanentErrorLabel_ setTextColor:gfx::SkColorToCalibratedNSColor( |
| 224 kPermanentErrorTextColor)]; |
| 225 |
| 226 [permanentErrorBox_ addSubview:permanentErrorLabel_]; |
| 227 [[self view] addSubview:permanentErrorBox_]; |
| 228 } |
| 229 |
| 230 NSAttributedString* attributedString = |
| 231 constrained_window::GetAttributedLabelString( |
| 232 SysUTF16ToNSString(text), kErrorFontStyle, NSNaturalTextAlignment, |
| 233 NSLineBreakByWordWrapping); |
| 234 [permanentErrorLabel_ setAttributedStringValue:attributedString]; |
| 235 } |
| 236 |
| 237 [permanentErrorBox_ setHidden:text.empty()]; |
| 238 [self setRetriableErrorMessage:base::string16()]; |
| 239 } |
| 240 |
211 - (void)updateVerifyButtonEnabled { | 241 - (void)updateVerifyButtonEnabled { |
212 autofill::CardUnmaskPromptController* controller = bridge_->GetController(); | 242 autofill::CardUnmaskPromptController* controller = bridge_->GetController(); |
213 DCHECK(controller); | 243 DCHECK(controller); |
214 | 244 |
215 BOOL enable = | 245 BOOL enable = |
216 ![inputRowView_ isHidden] && | 246 ![inputRowView_ isHidden] && |
217 controller->InputCvcIsValid( | 247 controller->InputCvcIsValid( |
218 base::SysNSStringToUTF16([cvcInput_ stringValue])) && | 248 base::SysNSStringToUTF16([cvcInput_ stringValue])) && |
219 (!monthPopup_ || | 249 (!monthPopup_ || |
220 [monthPopup_ indexOfSelectedItem] != monthPopupDefaultIndex_) && | 250 [monthPopup_ indexOfSelectedItem] != monthPopupDefaultIndex_) && |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP))]; | 305 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP))]; |
276 [view addSubview:[storageTooltip_ view]]; | 306 [view addSubview:[storageTooltip_ view]]; |
277 [[storageTooltip_ view] setFrameOrigin: | 307 [[storageTooltip_ view] setFrameOrigin: |
278 NSMakePoint(NSMaxX([storageCheckbox_ frame]) + kButtonGap, 0)]; | 308 NSMakePoint(NSMaxX([storageCheckbox_ frame]) + kButtonGap, 0)]; |
279 | 309 |
280 [CardUnmaskPromptViewCocoa sizeToFitView:view]; | 310 [CardUnmaskPromptViewCocoa sizeToFitView:view]; |
281 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:view]; | 311 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:view]; |
282 return view; | 312 return view; |
283 } | 313 } |
284 | 314 |
285 // TODO(bondd): Add an ASCII diagram of the layout. | 315 // +------------------------------------------------+ |
| 316 // | titleLabel_ (Single line.) | |
| 317 // |------------------------------------------------| |
| 318 // | permanentErrorBox_ (Multiline, may be hidden.) | |
| 319 // |------------------------------------------------| |
| 320 // | instructionsLabel_ (Multiline.) | |
| 321 // |------------------------------------------------| |
| 322 // | monthPopup_ yearPopup_ cvcInput_ cvcImage | |
| 323 // | (All enclosed in inputRowView_. Month and | |
| 324 // | year may be hidden.) | |
| 325 // |------------------------------------------------| |
| 326 // | errorLabel_ (Multiline. Always takes up space | |
| 327 // | for one line even if empty.) | |
| 328 // |------------------------------------------------| |
| 329 // | [Cancel] [Verify] | |
| 330 // |------------------------------------------------| |
| 331 // | storageCheckbox_ storageTooltip_ | |
| 332 // | (Both enclosed in storageView_.) | |
| 333 // +------------------------------------------------+ |
286 - (void)performLayoutAndDisplay:(BOOL)display { | 334 - (void)performLayoutAndDisplay:(BOOL)display { |
287 // Calculate dialog content width. | 335 // Calculate dialog content width. |
288 CGFloat contentWidth = | 336 CGFloat contentWidth = |
289 std::max(NSWidth([titleLabel_ frame]), NSWidth([inputRowView_ frame])); | 337 std::max(NSWidth([titleLabel_ frame]), NSWidth([inputRowView_ frame])); |
290 contentWidth = std::max(contentWidth, NSWidth([storageView_ frame])); | 338 contentWidth = std::max(contentWidth, NSWidth([storageView_ frame])); |
291 contentWidth = std::max(contentWidth, kDialogContentMinWidth); | 339 contentWidth = std::max(contentWidth, kDialogContentMinWidth); |
292 | 340 |
293 [storageView_ | 341 [storageView_ |
294 setFrameOrigin:NSMakePoint(0, chrome_style::kClientBottomPadding)]; | 342 setFrameOrigin:NSMakePoint(0, chrome_style::kClientBottomPadding)]; |
295 | 343 |
296 [verifyButton_ setFrameOrigin: | 344 [verifyButton_ setFrameOrigin: |
297 NSMakePoint(contentWidth - NSWidth([verifyButton_ frame]), | 345 NSMakePoint(contentWidth - NSWidth([verifyButton_ frame]), |
298 NSMaxY([storageView_ frame]) + chrome_style::kRowPadding)]; | 346 NSMaxY([storageView_ frame]) + chrome_style::kRowPadding)]; |
299 | 347 |
300 [cancelButton_ | 348 [cancelButton_ |
301 setFrameOrigin:NSMakePoint(NSMinX([verifyButton_ frame]) - kButtonGap - | 349 setFrameOrigin:NSMakePoint(NSMinX([verifyButton_ frame]) - kButtonGap - |
302 NSWidth([cancelButton_ frame]), | 350 NSWidth([cancelButton_ frame]), |
303 NSMinY([verifyButton_ frame]))]; | 351 NSMinY([verifyButton_ frame]))]; |
304 | 352 |
305 [errorLabel_ setFrameOrigin:NSMakePoint(0, NSMaxY([cancelButton_ frame]) + | 353 [errorLabel_ setFrame:NSMakeRect(0, NSMaxY([cancelButton_ frame]) + |
306 chrome_style::kRowPadding)]; | 354 chrome_style::kRowPadding, |
307 [CardUnmaskPromptViewCocoa sizeTextField:errorLabel_ toFitWidth:contentWidth]; | 355 contentWidth, 0)]; |
| 356 cocoa_l10n_util::WrapOrSizeToFit(errorLabel_); |
308 | 357 |
309 [inputRowView_ setFrameOrigin:NSMakePoint(0, NSMaxY([errorLabel_ frame]) + | 358 [inputRowView_ setFrameOrigin:NSMakePoint(0, NSMaxY([errorLabel_ frame]) + |
310 chrome_style::kRowPadding)]; | 359 chrome_style::kRowPadding)]; |
311 | 360 |
312 [instructionsLabel_ | 361 [instructionsLabel_ setFrame:NSMakeRect(0, NSMaxY([inputRowView_ frame]) + |
313 setFrameOrigin:NSMakePoint(0, NSMaxY([inputRowView_ frame]) + | 362 chrome_style::kRowPadding, |
314 chrome_style::kRowPadding)]; | 363 contentWidth, 0)]; |
315 [CardUnmaskPromptViewCocoa sizeTextField:instructionsLabel_ | 364 cocoa_l10n_util::WrapOrSizeToFit(instructionsLabel_); |
316 toFitWidth:contentWidth]; | |
317 | 365 |
318 [titleLabel_ | 366 // Layout permanent error box. |
319 setFrameOrigin:NSMakePoint(0, NSMaxY([instructionsLabel_ frame]) + | 367 CGFloat minY = NSMaxY([instructionsLabel_ frame]) + chrome_style::kRowPadding; |
320 chrome_style::kRowPadding)]; | 368 if (permanentErrorBox_ && ![permanentErrorBox_ isHidden]) { |
| 369 [permanentErrorBox_ setFrame:NSMakeRect(0, minY, contentWidth, 0)]; |
| 370 cocoa_l10n_util::WrapOrSizeToFit(permanentErrorLabel_); |
| 371 [permanentErrorBox_ sizeToFit]; |
| 372 minY = NSMaxY([permanentErrorBox_ frame]) + chrome_style::kRowPadding; |
| 373 } |
| 374 |
| 375 [titleLabel_ setFrameOrigin:NSMakePoint(0, minY)]; |
321 | 376 |
322 // Center progressOverlayLabel_ vertically within inputRowView_ frame. | 377 // Center progressOverlayLabel_ vertically within inputRowView_ frame. |
323 CGFloat progressHeight = ui::ResourceBundle::GetSharedInstance() | 378 CGFloat progressHeight = ui::ResourceBundle::GetSharedInstance() |
324 .GetFont(kProgressFontStyle) | 379 .GetFont(kProgressFontStyle) |
325 .GetHeight(); | 380 .GetHeight(); |
326 [progressOverlayLabel_ | 381 [progressOverlayLabel_ |
327 setFrame:NSMakeRect(0, ceil(NSMidY([inputRowView_ frame]) - | 382 setFrame:NSMakeRect(0, ceil(NSMidY([inputRowView_ frame]) - |
328 progressHeight / 2.0), | 383 progressHeight / 2.0), |
329 contentWidth, progressHeight)]; | 384 contentWidth, progressHeight)]; |
330 | 385 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 526 |
472 // Layout inputRowView_. | 527 // Layout inputRowView_. |
473 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_]; | 528 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_]; |
474 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_]; | 529 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_]; |
475 | 530 |
476 [self setView:mainView]; | 531 [self setView:mainView]; |
477 [self performLayoutAndDisplay:NO]; | 532 [self performLayoutAndDisplay:NO]; |
478 } | 533 } |
479 | 534 |
480 @end | 535 @end |
OLD | NEW |