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

Unified Diff: ash/system/chromeos/network/tray_network.cc

Issue 22601007: Adjust wifi toggle message layout to avoid the wrapping of the message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698