OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |