Commit e6c8f25f authored by Tommy Martino's avatar Tommy Martino Committed by Commit Bot

[Autofill Views] Enforcing minimum space btwn text

Currently in the Autofill dropdown, spacers which are subject to
flex sizing can end up smaller than the desired minimum size, which
means the primary and secondary text run together. This CL adds a small
class for the spacers which enforces a minimum size, and tells the
layout manager to respect the minimum size.

Screenshots (Googlers only):
https://docs.google.com/presentation/d/1IeyKg22nSbt8aDkvCGrHx1SBg7UBQIqymWDj2sLJ9JQ/edit?usp=sharing

Change-Id: I3b62af0f8355edf2353485986c7e529f8a0a8017
Bug: 875014
Reviewed-on: https://chromium-review.googlesource.com/1179981
Commit-Queue: Tommy Martino <tmartino@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584739}
parent 6cb5c6a3
......@@ -448,7 +448,9 @@ void AutofillPopupItemView::AddSpacerWithSize(int spacer_width,
auto* spacer = new views::View;
spacer->SetPreferredSize(gfx::Size(spacer_width, 1));
AddChildView(spacer);
layout->SetFlexForView(spacer, /*flex=*/resize ? 1 : 0);
layout->SetFlexForView(spacer,
/*flex=*/resize ? 1 : 0,
/*use_min_size=*/true);
}
/************** AutofillPopupSuggestionView **************/
......
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