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

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

Issue 175343007: Add sticky key support for AltGr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/sticky_keys/sticky_keys_controller.cc ('k') | no next file » | 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 154 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
155 horizontal_spacing, 155 horizontal_spacing,
156 vertical_spacing, 156 vertical_spacing,
157 child_spacing)); 157 child_spacing));
158 AddKeyLabel(ui::EF_CONTROL_DOWN, 158 AddKeyLabel(ui::EF_CONTROL_DOWN,
159 l10n_util::GetStringUTF8(IDS_ASH_CONTROL_KEY)); 159 l10n_util::GetStringUTF8(IDS_ASH_CONTROL_KEY));
160 AddKeyLabel(ui::EF_ALT_DOWN, 160 AddKeyLabel(ui::EF_ALT_DOWN,
161 l10n_util::GetStringUTF8(IDS_ASH_ALT_KEY)); 161 l10n_util::GetStringUTF8(IDS_ASH_ALT_KEY));
162 AddKeyLabel(ui::EF_SHIFT_DOWN, 162 AddKeyLabel(ui::EF_SHIFT_DOWN,
163 l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY)); 163 l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY));
164 AddKeyLabel(ui::EF_ALTGR_DOWN,
Tim Song 2014/02/23 02:07:32 We should only show this label if the current keyb
Zachary Kuznia 2014/02/24 19:28:03 Sounds reasonable. I'd prefer to split the UI cha
165 l10n_util::GetStringUTF8(IDS_ASH_ALTGR_KEY));
164 } 166 }
165 167
166 StickyKeysOverlayView::~StickyKeysOverlayView() {} 168 StickyKeysOverlayView::~StickyKeysOverlayView() {}
167 169
168 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) { 170 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) {
169 SkPaint paint; 171 SkPaint paint;
170 paint.setStyle(SkPaint::kFill_Style); 172 paint.setStyle(SkPaint::kFill_Style);
171 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55)); 173 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55));
172 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); 174 canvas->DrawRoundRect(GetLocalBounds(), 2, paint);
173 views::WidgetDelegateView::OnPaint(canvas); 175 views::WidgetDelegateView::OnPaint(canvas);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); 286 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator();
285 if (animator) 287 if (animator)
286 animator->RemoveObserver(this); 288 animator->RemoveObserver(this);
287 } 289 }
288 290
289 void StickyKeysOverlay::OnLayerAnimationScheduled( 291 void StickyKeysOverlay::OnLayerAnimationScheduled(
290 ui::LayerAnimationSequence* sequence) { 292 ui::LayerAnimationSequence* sequence) {
291 } 293 }
292 294
293 } // namespace ash 295 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sticky_keys/sticky_keys_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698