Commit 1bcf14ba authored by Jared Saul's avatar Jared Saul Committed by Commit Bot

[Autofill] Reduce large padding on card unmask dialog

As requested by bettes@, reduce default padding to 8px

Bug: 820619
Change-Id: Idb708763cfc3e5b1dcee456e7429d0ce28ced4b1
Reviewed-on: https://chromium-review.googlesource.com/958087
Commit-Queue: Jared Saul <jsaul@google.com>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543177}
parent 2239ac8b
......@@ -11,6 +11,7 @@
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/widget/widget.h"
namespace views {
......@@ -20,10 +21,6 @@ namespace {
// The visible width of bubble borders (differs from the actual width) in px.
const int kBubbleBorderVisibleWidth = 1;
// The margin between the content of the error bubble and its border.
const int kInfoBubbleHorizontalMargin = 14;
const int kInfoBubbleVerticalMargin = 12;
} // namespace
class InfoBubbleFrame : public BubbleFrameView {
......@@ -52,8 +49,8 @@ InfoBubble::InfoBubble(View* anchor, const base::string16& message)
DCHECK(anchor_);
SetAnchorView(anchor_);
set_margins(
gfx::Insets(kInfoBubbleVerticalMargin, kInfoBubbleHorizontalMargin));
set_margins(LayoutProvider::Get()->GetInsetsMetric(
InsetsMetric::INSETS_TOOLTIP_BUBBLE));
set_can_activate(false);
SetLayoutManager(std::make_unique<FillLayout>());
......
......@@ -58,6 +58,8 @@ gfx::Insets LayoutProvider::GetInsetsMetric(int metric) const {
return gfx::Insets(dialog_insets.top(), dialog_insets.left(), 0,
dialog_insets.right());
}
case InsetsMetric::INSETS_TOOLTIP_BUBBLE:
return gfx::Insets(8);
case InsetsMetric::INSETS_CHECKBOX_RADIO_BUTTON:
return gfx::Insets(5, 6);
case InsetsMetric::INSETS_VECTOR_IMAGE_BUTTON:
......
......@@ -32,6 +32,8 @@ enum InsetsMetric {
// The margins around the icon/title of a dialog. The bottom margin is implied
// by the content insets and the other margins overlap with INSETS_DIALOG.
INSETS_DIALOG_TITLE,
// The margins around the edges of a tooltip bubble.
INSETS_TOOLTIP_BUBBLE,
// Padding to add to vector image buttons to increase their click and touch
// target size.
INSETS_VECTOR_IMAGE_BUTTON,
......
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