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

Unified Diff: ui/keyboard/keyboard_layout_manager.cc

Issue 1226123014: Align VK with left edge of screen when shelf is left positioned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_layout_manager.cc
diff --git a/ui/keyboard/keyboard_layout_manager.cc b/ui/keyboard/keyboard_layout_manager.cc
index 6eee390dabf8734f7682f3839cb272cebf239809..60c7303fda393ba1ed7bba89d44fdb45f87aab8f 100644
--- a/ui/keyboard/keyboard_layout_manager.cc
+++ b/ui/keyboard/keyboard_layout_manager.cc
@@ -49,6 +49,10 @@ void KeyboardLayoutManager::SetChildBounds(aura::Window* child,
const gfx::Rect& window_bounds =
controller_->GetContainerWindow()->GetRootWindow()->bounds();
new_bounds.set_y(window_bounds.height() - new_bounds.height());
+ // If shelf is positioned on the left side of screen, x is not 0. In
+ // FULL_WIDTH mode, the virtual keyboard should always align with the left
+ // edge of the screen. So manually set x to 0 here.
+ new_bounds.set_x(0);
new_bounds.set_width(window_bounds.width());
}
// Keyboard bounds should only be reset when it actually changes. Otherwise
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698