| 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 "chrome/browser/cocoa/sad_tab_view.h" | 5 #include "chrome/browser/cocoa/sad_tab_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" |
| 7 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 8 #include "chrome/common/l10n_util.h" | |
| 9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 | 10 |
| 11 static const int kSadTabOffset = -64; | 11 static const int kSadTabOffset = -64; |
| 12 static const int kIconTitleSpacing = 20; | 12 static const int kIconTitleSpacing = 20; |
| 13 static const int kTitleMessageSpacing = 15; | 13 static const int kTitleMessageSpacing = 15; |
| 14 | 14 |
| 15 @implementation SadTabView | 15 @implementation SadTabView |
| 16 | 16 |
| 17 - (void)drawRect:(NSRect)dirtyRect { | 17 - (void)drawRect:(NSRect)dirtyRect { |
| 18 NSImage* sadTabImage = [NSImage imageNamed:@"sadtab"]; | 18 NSImage* sadTabImage = [NSImage imageNamed:@"sadtab"]; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 [sadTabImage drawAtPoint:NSMakePoint(iconX, iconY) | 71 [sadTabImage drawAtPoint:NSMakePoint(iconX, iconY) |
| 72 fromRect:NSZeroRect | 72 fromRect:NSZeroRect |
| 73 operation:NSCompositeSourceOver | 73 operation:NSCompositeSourceOver |
| 74 fraction:1.0f]; | 74 fraction:1.0f]; |
| 75 [titleString drawAtPoint:NSMakePoint(titleX, titleY)]; | 75 [titleString drawAtPoint:NSMakePoint(titleX, titleY)]; |
| 76 [messageString drawAtPoint:NSMakePoint(messageX, messageY)]; | 76 [messageString drawAtPoint:NSMakePoint(messageX, messageY)]; |
| 77 } | 77 } |
| 78 | 78 |
| 79 @end | 79 @end |
| OLD | NEW |