Commit 982c4988 authored by jennyz@chromium.org's avatar jennyz@chromium.org

Adjust wifi toggle message layout to avoid the wrapping of the message too shortly.

BUG=263984
R=stevenjb@chromium.org

Review URL: https://codereview.chromium.org/22601007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217029 0039d316-1c4b-4281-b951-d872f2087c98
parent 7e21bd1e
......@@ -264,6 +264,15 @@ 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);
}
void Update() {
bool wifi_enabled = NetworkHandler::Get()->network_state_handler()->
IsTechnologyEnabled(flimflam::kTypeWifi);
......@@ -276,6 +285,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_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment