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

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

Issue 12893005: Fixed image size problem with application icon in launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Crunshed PNG files Created 7 years, 9 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
« no previous file with comments | « no previous file | ash/resources/default_100_percent/common/launcher/launcher_appmenu.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app_list_button.h" 5 #include "ash/launcher/app_list_button.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "ash/launcher/launcher_types.h" 10 #include "ash/launcher/launcher_types.h"
(...skipping 29 matching lines...) Expand all
40 views::CustomButton::STATE_HOVERED, 40 views::CustomButton::STATE_HOVERED,
41 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT). 41 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT).
42 ToImageSkia()); 42 ToImageSkia());
43 SetImage( 43 SetImage(
44 views::CustomButton::STATE_PRESSED, 44 views::CustomButton::STATE_PRESSED,
45 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED). 45 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED).
46 ToImageSkia()); 46 ToImageSkia());
47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE)); 47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE));
48 SetSize(gfx::Size(kLauncherPreferredSize, kLauncherPreferredSize)); 48 SetSize(gfx::Size(kLauncherPreferredSize, kLauncherPreferredSize));
49 SetImageAlignment(ImageButton::ALIGN_CENTER, ImageButton::ALIGN_TOP); 49 SetImageAlignment(ImageButton::ALIGN_CENTER, ImageButton::ALIGN_TOP);
50 set_border(views::Border::CreateEmptyBorder(kBorderSize,
51 kBorderSize,
52 kBorderSize,
53 kBorderSize));
54 } 50 }
55 51
56 AppListButton::~AppListButton() { 52 AppListButton::~AppListButton() {
57 } 53 }
58 54
59 void AppListButton::StartLoadingAnimation() { 55 void AppListButton::StartLoadingAnimation() {
60 layer()->GetAnimator()->StopAnimating(); 56 layer()->GetAnimator()->StopAnimating();
61 57
62 scoped_ptr<ui::LayerAnimationSequence> opacity_sequence( 58 scoped_ptr<ui::LayerAnimationSequence> opacity_sequence(
63 new ui::LayerAnimationSequence()); 59 new ui::LayerAnimationSequence());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 host_->MouseExitedButton(this); 125 host_->MouseExitedButton(this);
130 } 126 }
131 127
132 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { 128 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) {
133 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 129 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
134 state->name = host_->GetAccessibleName(this); 130 state->name = host_->GetAccessibleName(this);
135 } 131 }
136 132
137 } // namespace internal 133 } // namespace internal
138 } // namespace ash 134 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/resources/default_100_percent/common/launcher/launcher_appmenu.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698