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

Side by Side Diff: ash/sticky_keys/sticky_keys_overlay.cc

Issue 23228004: Prepare to use gfx::RenderText in views::Label. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert Label implementation changes. Created 6 years, 5 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 | « ash/accelerators/exit_warning_handler.cc ('k') | ash/system/tray/tray_utils.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sticky_keys/sticky_keys_overlay.h" 5 #include "ash/sticky_keys/sticky_keys_overlay.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/sticky_keys/sticky_keys_controller.h" 9 #include "ash/sticky_keys/sticky_keys_controller.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 : state_(STICKY_KEY_STATE_DISABLED) { 63 : state_(STICKY_KEY_STATE_DISABLED) {
64 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 64 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
65 65
66 SetText(base::UTF8ToUTF16(key_name)); 66 SetText(base::UTF8ToUTF16(key_name));
67 SetHorizontalAlignment(gfx::ALIGN_LEFT); 67 SetHorizontalAlignment(gfx::ALIGN_LEFT);
68 SetFontList(rb->GetFontList(kKeyLabelFontStyle)); 68 SetFontList(rb->GetFontList(kKeyLabelFontStyle));
69 SetAutoColorReadabilityEnabled(false); 69 SetAutoColorReadabilityEnabled(false);
70 SetFocusable(false); 70 SetFocusable(false);
71 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); 71 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF));
72 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); 72 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF));
73 set_subpixel_rendering_enabled(false); 73 SetSubpixelRenderingEnabled(false);
74 } 74 }
75 75
76 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() { 76 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() {
77 } 77 }
78 78
79 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) { 79 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) {
80 state_ = state; 80 state_ = state;
81 SkColor label_color; 81 SkColor label_color;
82 int style; 82 int style;
83 switch (state) { 83 switch (state) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); 296 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator();
297 if (animator) 297 if (animator)
298 animator->RemoveObserver(this); 298 animator->RemoveObserver(this);
299 } 299 }
300 300
301 void StickyKeysOverlay::OnLayerAnimationScheduled( 301 void StickyKeysOverlay::OnLayerAnimationScheduled(
302 ui::LayerAnimationSequence* sequence) { 302 ui::LayerAnimationSequence* sequence) {
303 } 303 }
304 304
305 } // namespace ash 305 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/exit_warning_handler.cc ('k') | ash/system/tray/tray_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698