Commit 7584ad45 authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

Fix padding in personal info popup

Current view: http://screen/tLKNjpaEsCe
Specs: http://screen/nbDgNJ3gdRZ

Bug: 1102211
Fixes: 1102211
Change-Id: Id7ccb823db88f778d560719f5b0a83edc357f193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280754Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785250}
parent 028b7dcb
......@@ -26,7 +26,7 @@ constexpr int kAnnotationFontSize = 10;
// Style-related constants
constexpr int kAnnotationBorderThickness = 1;
constexpr int kAnnotationCornerRadius = 4;
constexpr int kPadding = 10;
constexpr int kPadding = 8;
constexpr int kAnnotationPaddingHeight = 6;
constexpr char kTabKey[] = "tab";
constexpr SkColor kConfirmedTextColor = gfx::kGoogleGrey900;
......
......@@ -46,6 +46,9 @@ class SettingLinkView : public views::View {
setting_link_ = AddChildView(
std::make_unique<views::Link>(base::UTF8ToUTF16(kSettingLinkLabel)));
setting_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
// TODO(crbug/1102215): Implement proper UI layout using Insets constant.
const gfx::Insets insets(0, kPadding, kPadding, kPadding);
setting_link_->SetBorder(views::CreateEmptyBorder(insets));
setting_link_->SetFontList(gfx::FontList({kFontStyle}, gfx::Font::ITALIC,
kSettingLinkFontSize,
gfx::Font::Weight::NORMAL));
......@@ -63,16 +66,6 @@ class SettingLinkView : public views::View {
delegate_->AssistiveWindowButtonClicked(button);
}
void Layout() override {
setting_link_->SetBounds(kPadding, 0, width(), height());
}
gfx::Size CalculatePreferredSize() const override {
gfx::Size size;
size.Enlarge(setting_link_->GetPreferredSize().width() + 2 * kPadding, 0);
return size;
}
DISALLOW_COPY_AND_ASSIGN(SettingLinkView);
};
......
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