Commit 3529f695 authored by estade's avatar estade Committed by Commit bot

CrOS: Right align captive portal/"controlled by extension" network icon

BUG=690179

Review-Url: https://codereview.chromium.org/2843383004
Cr-Commit-Position: refs/heads/master@{#468474}
parent 79b60e68
......@@ -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;
}
......
......@@ -10,9 +10,8 @@
namespace ash {
// An image view with a specified width and height (kTrayPopupDetailsIconWidth).
// If the specified width or height is zero, then the image size is used for
// that dimension.
// An image view with a specified width and height. If the specified width or
// height is zero, then the image size is used for that dimension.
class FixedSizedImageView : public views::ImageView {
public:
FixedSizedImageView(int width, int height);
......
......@@ -58,7 +58,6 @@ const int kTrayDetailedViewTransitionDelayMs = 100;
const int kTrayPopupLabelRightPadding = 8;
const int kTrayPopupDetailsIconWidth = 25;
const SkColor kTrayPopupHoverBackgroundColor = SkColorSetRGB(0xe4, 0xe4, 0xe4);
const int kTrayRoundedBorderRadius = 2;
......
......@@ -70,7 +70,6 @@ ASH_EXPORT extern const int kTrayDetailedViewTransitionDelayMs;
// item. This applies to all labels in the system menu.
extern const int kTrayPopupLabelRightPadding;
extern const int kTrayPopupDetailsIconWidth;
extern const SkColor kTrayPopupHoverBackgroundColor;
extern const int kTrayRoundedBorderRadius;
......
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