Index: chrome/browser/chromeos/login/network_selection_view.cc |
diff --git a/chrome/browser/chromeos/login/network_selection_view.cc b/chrome/browser/chromeos/login/network_selection_view.cc |
index 652b3cd894d4f5ac378c2a96b36a5a863cd8a6ab..19b3955817c6f9ffcfc7537e61663f62963b4f71 100644 |
--- a/chrome/browser/chromeos/login/network_selection_view.cc |
+++ b/chrome/browser/chromeos/login/network_selection_view.cc |
@@ -66,6 +66,10 @@ const int kSelectionBoxHeight = 29; |
// horizontal size, eaten by those icons. |
const int kMenuHorizontalOffset = -1; |
+// Constants were taken from 'views/controls/menu_button.cc'. |
+const int kDefaultMenuOffsetX = -2; |
+const int kDefaultMenuOffsetY = -4; |
+ |
// Vertical addition to the menu window to make it appear exactly below |
// MenuButton. |
const int kMenuVerticalOffset = 3; |
@@ -210,6 +214,7 @@ void NetworkSelectionView::InitLayout() { |
2 * kPaddingColumnWidth - kMediumPaddingColumnWidth - widest_label; |
delegate_->language_switch_menu()->SetFirstLevelMenuWidth( |
dropdown_width - kMenuWidthOffset); |
+ network_dropdown_->SetFirstLevelMenuWidth(dropdown_width - kMenuWidthOffset); |
// Define layout and column set for entire screen (welcome + screen). |
views::GridLayout* screen_layout = new views::GridLayout(this); |
@@ -288,6 +293,7 @@ void NetworkSelectionView::Init() { |
languages_menubutton_->SetFocusable(true); |
languages_menubutton_->SetNormalHasBorder(true); |
// Menu is positioned by bottom right corner of the MenuButton. |
+ // TODO(altimofeev): switch to the absolute offsets (button related) |
delegate_->language_switch_menu()->set_menu_offset(kMenuHorizontalOffset, |
kMenuVerticalOffset); |
@@ -297,6 +303,12 @@ void NetworkSelectionView::Init() { |
network_dropdown_ = new NetworkControlWithAccelerators(false, |
GetNativeWindow(), |
delegate_); |
+ |
+ // TODO(altimofeev): switch to the absolute offsets (button related) |
+ network_dropdown_->set_menu_offset( |
+ kDefaultMenuOffsetX + kMenuHorizontalOffset, |
+ kDefaultMenuOffsetY + kMenuVerticalOffset); |
+ |
network_dropdown_->SetNormalHasBorder(true); |
network_dropdown_->SetFocusable(true); |