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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 }; | 60 }; |
61 | 61 |
62 StickyKeyOverlayLabel::StickyKeyOverlayLabel(const std::string& key_name) | 62 StickyKeyOverlayLabel::StickyKeyOverlayLabel(const std::string& key_name) |
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); | |
71 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); | 70 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); |
72 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); | 71 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); |
73 SetSubpixelRenderingEnabled(false); | 72 SetSubpixelRenderingEnabled(false); |
74 } | 73 } |
75 | 74 |
76 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() { | 75 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() { |
77 } | 76 } |
78 | 77 |
79 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) { | 78 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) { |
80 state_ = state; | 79 state_ = state; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); | 315 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); |
317 if (animator) | 316 if (animator) |
318 animator->RemoveObserver(this); | 317 animator->RemoveObserver(this); |
319 } | 318 } |
320 | 319 |
321 void StickyKeysOverlay::OnLayerAnimationScheduled( | 320 void StickyKeysOverlay::OnLayerAnimationScheduled( |
322 ui::LayerAnimationSequence* sequence) { | 321 ui::LayerAnimationSequence* sequence) { |
323 } | 322 } |
324 | 323 |
325 } // namespace ash | 324 } // namespace ash |
OLD | NEW |