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