Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
index cf8bf8c3a79e8adb3a62d84b5be2359a438d569d..d15d6480de6f5a18942611b9be2fdd7cb50a0aea 100644 |
--- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
+++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
@@ -47,6 +47,12 @@ using chromeos::input_method::InputMethodManager; |
namespace ash { |
namespace { |
+// The width of the IME menu in dp. |
+const int kImeMenuWidth = 332; |
tdanderson
2016/11/30 23:16:01
The system menu size has since been increased to 3
Azure Wei
2016/12/01 02:55:34
Done. Move kMinimumSystemTrayMenuWidth(Md) into tr
|
+ |
+// The bottom padding of the title label. |
+const int kTitleRowBottomPadding = 5; |
+ |
// Returns the height range of ImeListView. |
gfx::Range GetImeListViewRange() { |
const int max_items = 5; |
@@ -114,8 +120,8 @@ class ImeTitleView : public views::View, public views::ButtonListener { |
SetLayoutManager(box_layout); |
title_label_ = |
new views::Label(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_IME)); |
- title_label_->SetBorder( |
- views::CreateEmptyBorder(0, kMenuEdgeEffectivePadding, 0, 0)); |
+ title_label_->SetBorder(views::CreateEmptyBorder( |
tdanderson
2016/11/30 23:16:01
For reference can you post a screenshot to the bug
Azure Wei
2016/12/01 02:55:34
Compared that the title row height should match. I
|
+ 0, kMenuEdgeEffectivePadding, kTitleRowBottomPadding, 0)); |
title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
AddChildView(title_label_); |
box_layout->SetFlexForView(title_label_, 1); |
@@ -325,8 +331,8 @@ ImeMenuTray::~ImeMenuTray() { |
void ImeMenuTray::ShowImeMenuBubble() { |
should_block_shelf_auto_hide_ = true; |
- views::TrayBubbleView::InitParams init_params( |
- GetAnchorAlignment(), kTrayPopupMinWidth, kTrayPopupMaxWidth); |
+ views::TrayBubbleView::InitParams init_params(GetAnchorAlignment(), |
+ kImeMenuWidth, kImeMenuWidth); |
init_params.can_activate = true; |
init_params.close_on_deactivate = true; |
@@ -357,10 +363,10 @@ void ImeMenuTray::ShowImeMenuBubble() { |
height_range.end()); |
} else if (current_height > height_range.end()) { |
ime_list_view_->scroller()->SetFixedSize( |
- gfx::Size(kTrayPopupMaxWidth, height_range.end())); |
+ gfx::Size(kImeMenuWidth, height_range.end())); |
} else if (current_height < height_range.start()) { |
ime_list_view_->scroller()->SetFixedSize( |
- gfx::Size(kTrayPopupMaxWidth, height_range.start())); |
+ gfx::Size(kImeMenuWidth, height_range.start())); |
} |
bubble_view->AddChildView(ime_list_view_); |