| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" | 9 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" |
| 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 const int kIconTextSpacer = 4; | 34 const int kIconTextSpacer = 4; |
| 35 const int kTextRightPadding = 4; | 35 const int kTextRightPadding = 4; |
| 36 const int kIconLeftPadding = 4; | 36 const int kIconLeftPadding = 4; |
| 37 | 37 |
| 38 const int kDefaultFontSize = 12; | 38 const int kDefaultFontSize = 12; |
| 39 | 39 |
| 40 }; // namespace | 40 }; // namespace |
| 41 | 41 |
| 42 @interface OffTheSideButtonCell : BookmarkButtonCell | 42 @interface OffTheSideButtonCell : BookmarkButtonCell |
| 43 |
| 44 - (NSString*)accessibilityTitle; |
| 45 |
| 43 @end | 46 @end |
| 44 @implementation OffTheSideButtonCell | 47 @implementation OffTheSideButtonCell |
| 45 | 48 |
| 46 - (BOOL)isOffTheSideButtonCell { | 49 - (BOOL)isOffTheSideButtonCell { |
| 47 return YES; | 50 return YES; |
| 48 } | 51 } |
| 49 | 52 |
| 53 - (NSString*)accessibilityTitle { |
| 54 return l10n_util::GetNSString(IDS_ACCNAME_BOOKMARKS_CHEVRON); |
| 55 } |
| 56 |
| 50 @end | 57 @end |
| 51 | 58 |
| 52 @interface BookmarkButtonCell(Private) | 59 @interface BookmarkButtonCell(Private) |
| 53 // Returns YES if the cell is the offTheSide button cell. | 60 // Returns YES if the cell is the offTheSide button cell. |
| 54 - (BOOL)isOffTheSideButtonCell; | 61 - (BOOL)isOffTheSideButtonCell; |
| 55 - (void)configureBookmarkButtonCell; | 62 - (void)configureBookmarkButtonCell; |
| 56 - (void)applyTextColor; | 63 - (void)applyTextColor; |
| 57 // Returns the title the button cell displays. Note that a button cell can | 64 // Returns the title the button cell displays. Note that a button cell can |
| 58 // have a title string assigned but it won't be visible if its image position | 65 // have a title string assigned but it won't be visible if its image position |
| 59 // is NSImageOnly. | 66 // is NSImageOnly. |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 const CGFloat kLineWidth = [controlView cr_lineWidth]; | 450 const CGFloat kLineWidth = [controlView cr_lineWidth]; |
| 444 if ([self isMaterialDesignButtonType] && ![self isFolderButtonCell] && | 451 if ([self isMaterialDesignButtonType] && ![self isFolderButtonCell] && |
| 445 kLineWidth < 1) { | 452 kLineWidth < 1) { |
| 446 return -kLineWidth; | 453 return -kLineWidth; |
| 447 } | 454 } |
| 448 return 0.0; | 455 return 0.0; |
| 449 } | 456 } |
| 450 | 457 |
| 451 | 458 |
| 452 @end | 459 @end |
| OLD | NEW |