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

Side by Side Diff: ash/launcher/launcher_button.cc

Issue 10868003: chromeos: Fix pixelated icons in app list and launcher (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ash/launcher/launcher_button.h" 5 #include "ash/launcher/launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 LauncherButton::~LauncherButton() { 140 LauncherButton::~LauncherButton() {
141 } 141 }
142 142
143 void LauncherButton::SetShadowedImage(const gfx::ImageSkia& image) { 143 void LauncherButton::SetShadowedImage(const gfx::ImageSkia& image) {
144 icon_view_->SetImage(gfx::ImageSkiaOperations::CreateImageWithDropShadow( 144 icon_view_->SetImage(gfx::ImageSkiaOperations::CreateImageWithDropShadow(
145 image, icon_shadows_)); 145 image, icon_shadows_));
146 } 146 }
147 147
148 void LauncherButton::SetImage(const gfx::ImageSkia& image) { 148 void LauncherButton::SetImage(const gfx::ImageSkia& image) {
149 if (image.isNull()) { 149 if (image.isNull() || image.image_reps().size() == 0) {
150 // TODO: need an empty image. 150 // TODO: need an empty image.
151 icon_view_->SetImage(image); 151 icon_view_->SetImage(image);
152 return; 152 return;
153 } 153 }
154 154
155 if (icon_view_->icon_size() == 0) { 155 if (icon_view_->icon_size() == 0) {
156 SetShadowedImage(image); 156 SetShadowedImage(image);
157 return; 157 return;
158 } 158 }
159 159
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 bar_->SetVerticalAlignment(views::ImageView::CENTER); 399 bar_->SetVerticalAlignment(views::ImageView::CENTER);
400 break; 400 break;
401 } 401 }
402 402
403 Layout(); 403 Layout();
404 SchedulePaint(); 404 SchedulePaint();
405 } 405 }
406 406
407 } // namespace internal 407 } // namespace internal
408 } // namespace ash 408 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_icon_image.h » ('j') | chrome/browser/extensions/extension_icon_image.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698