Commit af879fb9 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[profile-menu] Change sync info link to blue button

Bug: 995720
Change-Id: I4e0779618f75c607f9c93cda928ec9c1c8cc9ad0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845230
Auto-Submit: Thomas Tangl <tangltom@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703640}
parent 2373d58f
......@@ -318,7 +318,7 @@ void ProfileMenuViewBase::SetIdentityInfo(const gfx::ImageSkia& image,
}
void ProfileMenuViewBase::SetSyncInfo(const base::string16& description,
const base::string16& link_text,
const base::string16& clickable_text,
base::RepeatingClosure action) {
constexpr int kVerticalPadding = 8;
......@@ -340,15 +340,14 @@ void ProfileMenuViewBase::SetSyncInfo(const base::string16& description,
label->SetBorder(views::CreateEmptyBorder(gfx::Insets(0, kMenuEdgeMargin)));
}
views::Link* link = sync_info_container_->AddChildView(
std::make_unique<views::Link>(link_text));
link->SetHorizontalAlignment(gfx::ALIGN_CENTER);
link->set_listener(this);
link->SetBorder(views::CreateEmptyBorder(/*top=*/0, /*left=*/kMenuEdgeMargin,
/*bottom=*/kVerticalPadding,
/*right=*/kMenuEdgeMargin));
views::Button* button = sync_info_container_->AddChildView(
views::MdTextButton::CreateSecondaryUiBlueButton(this, clickable_text));
button->SetProperty(
views::kMarginsKey,
gfx::Insets(/*top=*/0, /*left=*/kMenuEdgeMargin,
/*bottom=*/kVerticalPadding, /*right=*/kMenuEdgeMargin));
RegisterClickAction(link, std::move(action));
RegisterClickAction(button, std::move(action));
}
void ProfileMenuViewBase::AddShortcutFeatureButton(
......
......@@ -100,7 +100,7 @@ class ProfileMenuViewBase : public content::WebContentsDelegate,
const base::string16& title,
const base::string16& subtitle = base::string16());
void SetSyncInfo(const base::string16& description,
const base::string16& link_text,
const base::string16& clickable_text,
base::RepeatingClosure action);
void AddShortcutFeatureButton(const gfx::ImageSkia& icon,
const base::string16& text,
......
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