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

Unified Diff: ash/system/network/network_list.cc

Issue 2843383004: CrOS: Right align captive portal/"controlled by extension" network icon (Closed)
Patch Set: dont add header Created 3 years, 8 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 | ash/system/tray/fixed_sized_image_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/network/network_list.cc
diff --git a/ash/system/network/network_list.cc b/ash/system/network/network_list.cc
index 179914cf14f562c6637bb37abd26df3b2be7218f..f882160deec00f5f2385c239b94d8873eac82340 100644
--- a/ash/system/network/network_list.cc
+++ b/ash/system/network/network_list.cc
@@ -630,7 +630,7 @@ HoverHighlightView* NetworkListView::CreateViewForNetwork(
container->SetTooltipText(info.tooltip);
views::View* controlled_icon = CreateControlledByExtensionView(info);
if (controlled_icon)
- container->AddChildView(controlled_icon);
+ container->AddRightView(controlled_icon);
return container;
}
@@ -661,17 +661,12 @@ views::View* NetworkListView::CreateControlledByExtensionView(
if (!extension_info)
return nullptr;
- // Get the tooltip text.
- base::string16 tooltip_text = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_EXTENSION_CONTROLLED_WIFI,
- base::UTF8ToUTF16(extension_info->extension_name));
-
- views::ImageView* controlled_icon =
- new FixedSizedImageView(kTrayPopupDetailsIconWidth, 0);
-
+ views::ImageView* controlled_icon = TrayPopupUtils::CreateMainImageView();
controlled_icon->SetImage(
gfx::CreateVectorIcon(kCaptivePortalIcon, kMenuIconColor));
- controlled_icon->SetTooltipText(tooltip_text);
+ controlled_icon->SetTooltipText(l10n_util::GetStringFUTF16(
+ IDS_ASH_STATUS_TRAY_EXTENSION_CONTROLLED_WIFI,
+ base::UTF8ToUTF16(extension_info->extension_name)));
return controlled_icon;
}
« no previous file with comments | « no previous file | ash/system/tray/fixed_sized_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698