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

Unified Diff: ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc

Issue 1877543002: Revise the shelf alignment locking mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update and cleanup tests. Created 4 years, 8 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 | « ash/system/chromeos/screen_security/screen_tray_item.cc ('k') | ash/system/date/tray_date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
diff --git a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
index 956442ae2fd73957e5a02fad873702dd0bde6b7c..8e0de691ce83054fdd789fe52a466d0d68f9c015 100644
--- a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
+++ b/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
@@ -7,6 +7,7 @@
#include "ash/keyboard/keyboard_ui.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_constants.h"
+#include "ash/shelf/shelf_util.h"
#include "ash/shell.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_notifier.h"
@@ -60,7 +61,7 @@ void VirtualKeyboardTray::SetShelfAlignment(ShelfAlignment alignment) {
// Square up the padding if horizontally aligned. Avoid extra padding when
// vertically aligned as the button would violate the width constraint on the
// shelf.
- if (alignment == SHELF_ALIGNMENT_BOTTOM) {
+ if (IsHorizontalAlignment(alignment)) {
gfx::Insets insets = button_->GetInsets();
int additional_padding = std::max(0, top_padding - left_padding);
left_padding += additional_padding;
« no previous file with comments | « ash/system/chromeos/screen_security/screen_tray_item.cc ('k') | ash/system/date/tray_date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698