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); | 70 SetFocusBehavior(FocusBehavior::NEVER); |
Evan Stade
2016/04/20 21:17:03
isn't NEVER the default? Why do you have to call t
karandeepb
2016/04/21 03:16:33
Yeah NEVER is the default. This was just refactori
Evan Stade
2016/04/25 21:30:52
I think we should remove it because I don't see it
Evan Stade
2016/04/25 21:32:33
oh, and maybe we can get rid of NEVER, as far as t
| |
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 SetSubpixelRenderingEnabled(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; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); | 316 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); |
317 if (animator) | 317 if (animator) |
318 animator->RemoveObserver(this); | 318 animator->RemoveObserver(this); |
319 } | 319 } |
320 | 320 |
321 void StickyKeysOverlay::OnLayerAnimationScheduled( | 321 void StickyKeysOverlay::OnLayerAnimationScheduled( |
322 ui::LayerAnimationSequence* sequence) { | 322 ui::LayerAnimationSequence* sequence) { |
323 } | 323 } |
324 | 324 |
325 } // namespace ash | 325 } // namespace ash |
OLD | NEW |