| 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_bar_folder_button_cell.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h" |
| 6 | 6 |
| 7 #include "ui/base/material_design/material_design_controller.h" |
| 8 |
| 7 using bookmarks::BookmarkNode; | 9 using bookmarks::BookmarkNode; |
| 8 | 10 |
| 9 @implementation BookmarkBarFolderButtonCell | 11 @implementation BookmarkBarFolderButtonCell |
| 10 | 12 |
| 11 + (id)buttonCellForNode:(const BookmarkNode*)node | 13 + (id)buttonCellForNode:(const BookmarkNode*)node |
| 12 text:(NSString*)text | 14 text:(NSString*)text |
| 13 image:(NSImage*)image | 15 image:(NSImage*)image |
| 14 menuController:(BookmarkContextMenuCocoaController*)menuController { | 16 menuController:(BookmarkContextMenuCocoaController*)menuController { |
| 15 id buttonCell = | 17 id buttonCell = |
| 16 [[[BookmarkBarFolderButtonCell alloc] initForNode:node | 18 [[[BookmarkBarFolderButtonCell alloc] initForNode:node |
| 17 text:text | 19 text:text |
| 18 image:image | 20 image:image |
| 19 menuController:menuController] | 21 menuController:menuController] |
| 20 autorelease]; | 22 autorelease]; |
| 21 return buttonCell; | 23 return buttonCell; |
| 22 } | 24 } |
| 23 | 25 |
| 24 - (BOOL)isFolderButtonCell { | 26 - (BOOL)isFolderButtonCell { |
| 25 return YES; | 27 return YES; |
| 26 } | 28 } |
| 27 | 29 |
| 28 - (void)setMouseInside:(BOOL)flag animate:(BOOL)animated { | 30 - (void)setMouseInside:(BOOL)flag animate:(BOOL)animated { |
| 29 } | 31 } |
| 30 | 32 |
| 33 - (int)verticalTextOffset { |
| 34 if (!ui::MaterialDesignController::IsModeMaterial()) { |
| 35 return [super verticalTextOffset]; |
| 36 } |
| 37 return -3; |
| 38 } |
| 39 |
| 31 @end | 40 @end |
| OLD | NEW |