Commit 1037e4ac authored by Roman Aleksandrov's avatar Roman Aleksandrov Committed by Commit Bot

Login Screen: Apply POD and Pin pad specs

Bug: 1001484
Change-Id: I9e8ac8b51a197d807abe21b6c81546d5c9042f72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823848Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov <antrim@chromium.org>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Roman Aleksandrov <raleksandrov@google.com>
Cr-Commit-Position: refs/heads/master@{#703676}
parent d4f491c7
......@@ -64,16 +64,16 @@ constexpr const char kLoginAuthUserViewClassName[] = "LoginAuthUserView";
// Distance between the user view (ie, the icon and name) and the password
// textfield.
const int kDistanceBetweenUserViewAndPasswordDp = 28;
const int kDistanceBetweenUserViewAndPasswordDp = 24;
// Distance between the password textfield and the the pin keyboard.
const int kDistanceBetweenPasswordFieldAndPinKeyboardDp = 20;
const int kDistanceBetweenPasswordFieldAndPinKeyboardDp = 16;
// Distance from the end of pin keyboard to the bottom of the big user view.
const int kDistanceFromPinKeyboardToBigUserViewBottomDp = 50;
// Distance from the top of the user view to the user icon.
constexpr int kDistanceFromTopOfBigUserViewToUserIconDp = 54;
constexpr int kDistanceFromTopOfBigUserViewToUserIconDp = 24;
constexpr SkColor kChallengeResponseArrowBackgroundColor =
SkColorSetARGB(0x2B, 0xFF, 0xFF, 0xFF);
......
......@@ -61,13 +61,11 @@ constexpr int kInitialBackspaceDelayMs = 500;
constexpr int kRepeatingBackspaceDelayMs = 150;
// Size of the md-ripple when a PIN button is tapped.
constexpr int kRippleSizeDp = 54;
constexpr int kRippleSizeDp = 48;
// Button sizes. Button height varies per keyboard style, while button width is
// the same for both styles.
constexpr int kAlphanumericButtonHeightDp = 78;
constexpr int kNumericButtonHeightDp = 70;
constexpr int kButtonWidthDp = 78;
// Button sizes.
constexpr int kButtonHeightDp = 56;
constexpr int kButtonWidthDp = 72;
base::string16 GetButtonLabelForNumber(int value) {
DCHECK(value >= 0 && value < int{base::size(kPinLabels)});
......@@ -399,9 +397,7 @@ class LoginPinView::BackButton : public BasePinButton {
// static
gfx::Size LoginPinView::TestApi::GetButtonSize(Style style) {
return gfx::Size(kButtonWidthDp, style == Style::kNumeric
? kNumericButtonHeightDp
: kAlphanumericButtonHeightDp);
return gfx::Size(kButtonWidthDp, kButtonHeightDp);
}
LoginPinView::TestApi::TestApi(LoginPinView* view) : view_(view) {}
......@@ -454,9 +450,7 @@ LoginPinView::LoginPinView(Style keyboard_style,
views::BoxLayout::Orientation::kVertical));
bool show_letters = keyboard_style == Style::kAlphanumeric;
const gfx::Size button_size =
gfx::Size(kButtonWidthDp, show_letters ? kAlphanumericButtonHeightDp
: kNumericButtonHeightDp);
const gfx::Size button_size = gfx::Size(kButtonWidthDp, kButtonHeightDp);
auto add_digit_button = [&](View* row, int value) {
row->AddChildView(
......
......@@ -41,7 +41,7 @@ namespace ash {
namespace {
// Vertical spacing between icon, label, and authentication UI.
constexpr int kVerticalSpacingBetweenEntriesDp = 32;
constexpr int kVerticalSpacingBetweenEntriesDp = 24;
// Horizontal spacing between username label and the dropdown icon.
constexpr int kDistanceBetweenUsernameAndDropdownDp = 8;
// Distance between user icon and the user label in small/extra-small layouts.
......
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