Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: ui/app_list/cocoa/apps_grid_view_item.mm

Issue 15303003: UI Updates for OSX App Launcher: truncate titles, window shadow. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: need to set Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/cocoa/app_list_window_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/cocoa/apps_grid_view_item.h" 5 #import "ui/app_list/cocoa/apps_grid_view_item.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // This NSButton style always positions the icon at the very top of the 156 // This NSButton style always positions the icon at the very top of the
157 // button frame. AppsGridViewItem uses an enclosing view so that it is 157 // button frame. AppsGridViewItem uses an enclosing view so that it is
158 // visually correct. 158 // visually correct.
159 [prototypeButton setImagePosition:NSImageAbove]; 159 [prototypeButton setImagePosition:NSImageAbove];
160 [prototypeButton setButtonType:NSMomentaryChangeButton]; 160 [prototypeButton setButtonType:NSMomentaryChangeButton];
161 [prototypeButton setBordered:NO]; 161 [prototypeButton setBordered:NO];
162 162
163 [[prototypeButton cell] 163 [[prototypeButton cell]
164 setFont:ui::ResourceBundle::GetSharedInstance().GetFont( 164 setFont:ui::ResourceBundle::GetSharedInstance().GetFont(
165 app_list::kItemTextFontStyle).GetNativeFont()]; 165 app_list::kItemTextFontStyle).GetNativeFont()];
166 [[prototypeButton cell] setLineBreakMode:NSLineBreakByTruncatingTail];
166 167
167 scoped_nsobject<AppsGridItemBackgroundView> prototypeButtonBackground( 168 scoped_nsobject<AppsGridItemBackgroundView> prototypeButtonBackground(
168 [[AppsGridItemBackgroundView alloc] initWithFrame:NSMakeRect( 169 [[AppsGridItemBackgroundView alloc] initWithFrame:NSMakeRect(
169 0, 0, tileSize.width, tileSize.height)]); 170 0, 0, tileSize.width, tileSize.height)]);
170 [prototypeButtonBackground addSubview:prototypeButton]; 171 [prototypeButtonBackground addSubview:prototypeButton];
171 [self setView:prototypeButtonBackground]; 172 [self setView:prototypeButtonBackground];
172 } 173 }
173 return self; 174 return self;
174 } 175 }
175 176
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 - (void)mouseExited:(NSEvent*)theEvent { 219 - (void)mouseExited:(NSEvent*)theEvent {
219 [self setSelected:NO]; 220 [self setSelected:NO];
220 } 221 }
221 222
222 - (void)setSelected:(BOOL)flag { 223 - (void)setSelected:(BOOL)flag {
223 [[self itemBackgroundView] setSelected:flag]; 224 [[self itemBackgroundView] setSelected:flag];
224 [super setSelected:flag]; 225 [super setSelected:flag];
225 } 226 }
226 227
227 @end 228 @end
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698