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

Unified Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 2208013002: Force all Mac Task Manager icons to be the same size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/task_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm
index 3beddcc5ca791af2b1acf2e9c32c38548c0f3f27..5b429c12881c54cad2ff0a655628aa9c27ecf746 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac.mm
@@ -603,12 +603,13 @@ void TaskManagerMac::WindowWasClosed() {
}
NSImage* TaskManagerMac::GetImageForRow(int row) {
- const CGFloat kImageWidth = 16.0;
+ const NSSize kImageSize = NSMakeSize(16.0, 16.0);
NSImage* image = gfx::NSImageFromImageSkia(table_model_->GetIcon(row));
- if (!image) {
- image = [[[NSImage alloc] initWithSize:NSMakeSize(kImageWidth, kImageWidth)]
- autorelease];
- }
+ if (image)
+ image.size = kImageSize;
+ else
+ image = [[[NSImage alloc] initWithSize:kImageSize] autorelease];
+
return image;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698