Chromium Code Reviews| Index: ash/system/chromeos/network/tray_network.cc |
| diff --git a/ash/system/chromeos/network/tray_network.cc b/ash/system/chromeos/network/tray_network.cc |
| index fdaa4d8287e0b563d40e8bed2168f80751cfe80c..c450ccedaa462613f244fe3c03fee38246e2de6f 100644 |
| --- a/ash/system/chromeos/network/tray_network.cc |
| +++ b/ash/system/chromeos/network/tray_network.cc |
| @@ -264,6 +264,13 @@ class NetworkWifiDetailedView : public NetworkDetailedView { |
| } |
| private: |
| + virtual void Layout() OVERRIDE { |
| + // Center both views vertically. |
| + views::View::Layout(); |
| + image_view_->SetY((height()-image_view_->GetPreferredSize().height())/2); |
| + label_view_->SetY((height()-label_view_->GetPreferredSize().height())/2); |
|
stevenjb
2013/08/09 23:54:47
' ' around '-' and '/' for both lines
jennyz
2013/08/10 00:13:57
Done.
|
| + } |
| + |
| void Update() { |
| bool wifi_enabled = NetworkHandler::Get()->network_state_handler()-> |
| IsTechnologyEnabled(flimflam::kTypeWifi); |
| @@ -276,6 +283,9 @@ class NetworkWifiDetailedView : public NetworkDetailedView { |
| IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED : |
| IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED; |
| label_view_->SetText(bundle.GetLocalizedString(string_id)); |
| + label_view_->SizeToFit(kTrayPopupMinWidth - |
| + kTrayPopupPaddingHorizontal * 2 - kTrayPopupPaddingBetweenItems - |
| + kTrayPopupDetailsIconWidth); |
| } |
| views::ImageView* image_view_; |