OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/l10n_util_mac.h" | 5 #include "app/l10n_util_mac.h" |
6 #include "app/resource_bundle.h" | 6 #include "app/resource_bundle.h" |
7 #include "base/file_version_info.h" | 7 #include "base/file_version_info.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac_util.h" | 9 #include "base/mac_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:legalBlock_]; | 233 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:legalBlock_]; |
234 | 234 |
235 NSRect rect = [legalBlock_ frame]; | 235 NSRect rect = [legalBlock_ frame]; |
236 rect.origin.y -= updateShift; | 236 rect.origin.y -= updateShift; |
237 [legalBlock_ setFrame:rect]; | 237 [legalBlock_ setFrame:rect]; |
238 | 238 |
239 rect = [backgroundView_ frame]; | 239 rect = [backgroundView_ frame]; |
240 rect.origin.y = rect.origin.y - updateShift + legalShift; | 240 rect.origin.y = rect.origin.y - updateShift + legalShift; |
241 [backgroundView_ setFrame:rect]; | 241 [backgroundView_ setFrame:rect]; |
242 | 242 |
243 NSWindow* window = [self window]; | 243 NSSize windowDelta = NSMakeSize(0, (legalShift - updateShift)); |
244 [[window contentView] setAutoresizesSubviews:NO]; | 244 [GTMUILocalizerAndLayoutTweaker |
245 rect = [window frame]; | 245 resizeWindowWithoutAutoResizingSubViews:[self window] |
246 rect.size.height = rect.size.height - updateShift + legalShift; | 246 delta:windowDelta]; |
247 [window setFrame:rect display:NO]; | |
248 [[window contentView] setAutoresizesSubviews:YES]; | |
249 } | 247 } |
250 | 248 |
251 - (KeystoneGlue*)defaultKeystoneGlue { | 249 - (KeystoneGlue*)defaultKeystoneGlue { |
252 return [KeystoneGlue defaultKeystoneGlue]; | 250 return [KeystoneGlue defaultKeystoneGlue]; |
253 } | 251 } |
254 | 252 |
255 - (void)startProgressMessageID:(uint32_t)messageID { | 253 - (void)startProgressMessageID:(uint32_t)messageID { |
256 NSString* message = l10n_util::GetNSStringWithFixup(messageID); | 254 NSString* message = l10n_util::GetNSStringWithFixup(messageID); |
257 [self startProgressMessage:message]; | 255 [self startProgressMessage:message]; |
258 } | 256 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 - (NSButton*)updateButton { | 383 - (NSButton*)updateButton { |
386 return updateNowButton_; | 384 return updateNowButton_; |
387 } | 385 } |
388 | 386 |
389 - (NSTextField*)updateText { | 387 - (NSTextField*)updateText { |
390 return updateText_; | 388 return updateText_; |
391 } | 389 } |
392 | 390 |
393 @end | 391 @end |
394 | 392 |
OLD | NEW |