Commit 208a6e6e authored by Thomas Tellier's avatar Thomas Tellier Committed by Commit Bot

[CrOS] Migrate part of login screen colors, review bubbles and buttons

Bug: 1104336
Change-Id: Ia528cbd3595da7f7b2459e0f0ea475235b491f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533773
Commit-Queue: Thomas Tellier <tellier@google.com>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarMin Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826724}
parent 06bdd3ee
......@@ -6,6 +6,7 @@
#include "ash/public/cpp/login_constants.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_provider.h"
#include "base/strings/strcat.h"
#include "base/strings/string16.h"
#include "ui/accessibility/ax_enums.mojom.h"
......@@ -48,7 +49,8 @@ FlexCodeInput::FlexCodeInput(OnInputChange on_input_change,
code_field_ = AddChildView(std::make_unique<views::Textfield>());
code_field_->set_controller(this);
code_field_->SetTextColor(login_constants::kAuthMethodsTextColor);
code_field_->SetTextColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary));
code_field_->SetFontList(views::Textfield::GetDefaultFontList().Derive(
kAccessCodeFontSizeDeltaDp, gfx::Font::FontStyle::NORMAL,
gfx::Font::Weight::NORMAL));
......
......@@ -65,6 +65,9 @@ ArrowButtonView::ArrowButtonView(PressedCallback callback, int size)
focus_ring()->SetPathGenerator(
std::make_unique<views::FixedSizeCircleHighlightPathGenerator>(
kArrowIconBackroundRadius));
SetBackgroundColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive));
}
ArrowButtonView::~ArrowButtonView() = default;
......
......@@ -114,9 +114,6 @@ constexpr int kMediumDensityDistanceBetweenAuthUserAndUsersPortraitDp = 84;
constexpr int kHorizontalPaddingAuthErrorBubbleDp = 8;
constexpr int kVerticalPaddingAuthErrorBubbleDp = 8;
// The font color of the bottom status indicator for enterprise management.
constexpr SkColor kBottomStatusManagedFontColor = gfx::kGoogleGrey200;
// The font color of the bottom status indicator for ADB warning.
constexpr SkColor kBottomStatusAdbFontColor = gfx::kGoogleRed300;
......@@ -209,7 +206,8 @@ void MakeSectionBold(views::StyledLabel* label,
style.custom_font = label->GetFontList().Derive(
0, gfx::Font::FontStyle::NORMAL, gfx::Font::Weight::BOLD);
}
style.override_color = gfx::kGoogleGrey200;
style.override_color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary);
return style;
};
......@@ -337,8 +335,7 @@ class UserAddingScreenIndicator : public views::View {
base::string16 message =
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_USER_ADDING_BANNER);
views::Label* label_ = login_views_utils::CreateBubbleLabel(
message, gfx::kGoogleGrey200, this);
views::Label* label_ = login_views_utils::CreateBubbleLabel(message, this);
label_->SetText(message);
AddChildView(label_);
......@@ -785,7 +782,9 @@ void LockContentsView::ShowEnterpriseDomainManager(
bottom_status_indicator_->SetText(l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_DEVICE_INDICATOR, ui::GetChromeOSDeviceName(),
base::UTF8ToUTF16(entreprise_domain_manager)));
bottom_status_indicator_->SetEnabledTextColors(kBottomStatusManagedFontColor);
bottom_status_indicator_->SetEnabledTextColors(
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary));
bottom_status_indicator_->set_role_for_accessibility(
ax::mojom::Role::kButton);
bottom_status_indicator_status_ = BottomIndicatorState::kManagedDevice;
......
......@@ -1005,7 +1005,6 @@ void LockDebugView::UpdatePerUserActionContainer() {
name->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary));
name->SetAutoColorReadabilityEnabled(false);
// name->SetFontList(name->font_list().DeriveWithSizeDelta(3));
row->AddChildView(name);
AddButton("Toggle PIN",
......
......@@ -90,9 +90,6 @@ const int kDistanceFromPinKeyboardToBigUserViewBottomDp = 50;
// Distance from the top of the user view to the user icon.
constexpr int kDistanceFromTopOfBigUserViewToUserIconDp = 24;
constexpr SkColor kChallengeResponseSmartCardIconColor = gfx::kGoogleGrey200;
constexpr SkColor kChallengeResponseArrowBackgroundColor =
SkColorSetARGB(0x2B, 0xFF, 0xFF, 0xFF);
constexpr SkColor kChallengeResponseErrorColor = gfx::kGoogleRed300;
// Date time format containing only the day of the week, for example: "Tuesday".
......@@ -221,7 +218,8 @@ class FingerprintLabel : public views::Label {
FingerprintLabel() {
SetSubpixelRenderingEnabled(false);
SetAutoColorReadabilityEnabled(false);
SetEnabledColor(login_constants::kAuthMethodsTextColor);
SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary));
SetMultiLine(true);
SetTextBasedOnState(FingerprintState::AVAILABLE_DEFAULT,
......@@ -561,7 +559,6 @@ class LoginAuthUserView::ChallengeResponseView : public views::View {
arrow_button_view->SetInstallFocusRingOnFocus(true);
views::InstallCircleHighlightPathGenerator(arrow_button_view.get());
arrow_button_ = AddChildView(std::move(arrow_button_view));
arrow_button_->SetBackgroundColor(kChallengeResponseArrowBackgroundColor);
arrow_button_->SetAccessibleName(l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_START_SMART_CARD_AUTH_BUTTON_ACCESSIBLE_NAME));
......@@ -581,7 +578,8 @@ class LoginAuthUserView::ChallengeResponseView : public views::View {
GetTextForLabel(), views::style::CONTEXT_LABEL,
views::style::STYLE_PRIMARY));
label_->SetAutoColorReadabilityEnabled(false);
label_->SetEnabledColor(login_constants::kAuthMethodsTextColor);
label_->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary));
label_->SetSubpixelRenderingEnabled(false);
label_->SetFontList(views::Label::GetDefaultFontList().Derive(
/*size_delta=*/1, gfx::Font::FontStyle::ITALIC,
......@@ -625,9 +623,10 @@ class LoginAuthUserView::ChallengeResponseView : public views::View {
switch (state_) {
case State::kInitial:
case State::kAuthenticating:
return gfx::CreateVectorIcon(kLockScreenSmartCardIcon,
kChallengeResponseIconSizeDp,
kChallengeResponseSmartCardIconColor);
return gfx::CreateVectorIcon(
kLockScreenSmartCardIcon, kChallengeResponseIconSizeDp,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary));
case State::kFailure:
return gfx::CreateVectorIcon(kLockScreenSmartCardFailureIcon,
kChallengeResponseIconSizeDp,
......
......@@ -9,7 +9,6 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shell.h"
#include "ash/style/ash_color_provider.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/gfx/paint_vector_icon.h"
......@@ -56,8 +55,7 @@ void LoginErrorBubble::SetContent(views::View* content) {
}
void LoginErrorBubble::SetTextContent(const base::string16& message) {
SetContent(
login_views_utils::CreateBubbleLabel(message, gfx::kGoogleGrey200, this));
SetContent(login_views_utils::CreateBubbleLabel(message, this));
}
void LoginErrorBubble::SetAccessibleName(const base::string16& name) {
......
......@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "ash/login/ui/login_base_bubble_view.h"
#include "ash/style/ash_color_provider.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/views/view.h"
......
......@@ -60,7 +60,6 @@ constexpr SkColor kPublicSessionBlueColor =
SkColorSetARGB(0xDE, 0x7B, 0xAA, 0xF7);
constexpr SkColor kSelectionMenuTitleColor =
SkColorSetARGB(0x57, 0xFF, 0xFF, 0xFF);
constexpr SkColor kArrowButtonColor = SkColorSetARGB(0xFF, 0x42, 0x85, 0xF4);
constexpr int kDropDownIconSizeDp = 16;
constexpr int kArrowButtonSizeDp = 48;
......@@ -410,7 +409,6 @@ class RightPaneView : public NonAccessibleView {
base::BindRepeating(&RightPaneView::SubmitButtonPressed,
base::Unretained(this)),
kArrowButtonSizeDp);
submit_button_->SetBackgroundColor(kArrowButtonColor);
AddChildView(submit_button_);
}
......
......@@ -20,8 +20,8 @@ LoginPalette CreateDefaultLoginPalette() {
return LoginPalette(
{.password_text_color = color_provider->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary),
.password_placeholder_text_color =
login_constants::kAuthMethodsTextColor,
.password_placeholder_text_color = color_provider->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary),
.password_background_color = SK_ColorTRANSPARENT,
.button_enabled_color = color_provider->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary),
......
......@@ -20,10 +20,6 @@ namespace {
constexpr char kLoginPublicAccountUserViewClassName[] =
"LoginPublicAccountUserView";
// Color of the user domain text.
constexpr SkColor kArrowButtonBackground =
SkColorSetARGB(0x2B, 0xFF, 0xFF, 0xFF);
// Distance from the top of the user view to the user icon.
constexpr int kDistanceFromTopOfBigUserViewToUserIconDp = 54;
......@@ -77,7 +73,6 @@ LoginPublicAccountUserView::LoginPublicAccountUserView(
base::BindRepeating(&LoginPublicAccountUserView::ArrowButtonPressed,
base::Unretained(this)),
kArrowButtonSizeDp);
arrow_button->SetBackgroundColor(kArrowButtonBackground);
arrow_button->SetFocusPainter(nullptr);
SetPaintToLayer(ui::LayerType::LAYER_NOT_DRAWN);
......
......@@ -6,7 +6,6 @@
#include "ash/login/ui/non_accessible_view.h"
#include "ash/login/ui/views_utils.h"
#include "ash/style/ash_color_provider.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
......@@ -36,8 +35,7 @@ LoginTooltipView::LoginTooltipView(const base::string16& message,
AshColorProvider::ContentLayerType::kIconColorPrimary)));
AddChildView(info_icon);
label_ =
login_views_utils::CreateBubbleLabel(message, gfx::kGoogleGrey200, this);
label_ = login_views_utils::CreateBubbleLabel(message, this);
AddChildView(label_);
}
......
......@@ -37,8 +37,14 @@ constexpr int kVerticalPaddingLoginUserMenuViewDp = 8;
constexpr int kUserMenuRemoveUserButtonIdForTest = 1;
// Font size delta from normal for the username headline.
constexpr int kUserMenuFontSizeDeltaUsername = 2;
// Font name of the username headline.
constexpr char kUserMenuFontNameUsername[] = "Google Sans";
// Font size of the username headline.
constexpr int kUserMenuFontSizeUsername = 15;
// Line height of the username headline.
constexpr int kUserMenuLineHeightUsername = 22;
// Traps the focus so it does not move from the |trapped_focus| view.
class TrappedFocusSearch : public views::FocusSearch {
......@@ -159,11 +165,17 @@ LoginUserMenuView::LoginUserMenuView(
kUserMenuVerticalMarginUsernameMailDp));
AddChildView(container);
username_label_ = login_views_utils::CreateBubbleLabel(
display_username, gfx::kGoogleGrey200, nullptr,
kUserMenuFontSizeDeltaUsername, gfx::Font::Weight::BOLD);
display_username, nullptr,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary),
gfx::FontList({kUserMenuFontNameUsername}, gfx::Font::FontStyle::NORMAL,
kUserMenuFontSizeUsername, gfx::Font::Weight::MEDIUM),
kUserMenuLineHeightUsername);
container->AddChildView(username_label_);
views::Label* email_label =
login_views_utils::CreateBubbleLabel(email, gfx::kGoogleGrey500);
views::Label* email_label = login_views_utils::CreateBubbleLabel(
email, nullptr,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary));
container->AddChildView(email_label);
}
......@@ -175,8 +187,8 @@ LoginUserMenuView::LoginUserMenuView(
base::string16 managed_text = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_SESSION_MONITORING_USER_WARNING,
base::UTF8ToUTF16(user.user_account_manager.value()));
management_disclosure_label_ = login_views_utils::CreateBubbleLabel(
managed_text, gfx::kGoogleGrey200, this);
management_disclosure_label_ =
login_views_utils::CreateBubbleLabel(managed_text, this);
managed_user_data_->AddChildView(management_disclosure_label_);
AddChildView(managed_user_data_);
}
......@@ -208,10 +220,10 @@ LoginUserMenuView::LoginUserMenuView(
remove_user_confirm_data_->SetVisible(false);
remove_user_confirm_data_->AddChildView(
login_views_utils::CreateBubbleLabel(part1, gfx::kGoogleGrey200, this));
login_views_utils::CreateBubbleLabel(part1, this));
remove_user_confirm_data_->AddChildView(
login_views_utils::CreateBubbleLabel(part2, gfx::kGoogleGrey200, this));
login_views_utils::CreateBubbleLabel(part2, this));
remove_user_button_ = new RemoveUserButton(
base::BindRepeating(&LoginUserMenuView::RemoveUserButtonPressed,
......
......@@ -421,7 +421,10 @@ LoginUserView::LoginUserView(
gfx::Size(kDropdownIconSizeDp, kDropdownIconSizeDp));
dropdown_->SetImage(
views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(kLockScreenDropdownIcon, gfx::kGoogleGrey200));
gfx::CreateVectorIcon(
kLockScreenDropdownIcon,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary)));
dropdown_->SetFocusBehavior(FocusBehavior::ALWAYS);
}
tap_button_ = new TapButton(on_tap_, this);
......
......@@ -78,7 +78,6 @@ constexpr int kAlpha70Percent = 178;
constexpr int kAlpha74Percent = 189;
constexpr SkColor kErrorColor = gfx::kGoogleRed300;
constexpr SkColor kArrowButtonColor = SkColorSetARGB(0x2B, 0xFF, 0xFF, 0xFF);
bool IsTabletMode() {
return Shell::Get()->tablet_mode_controller()->InTabletMode();
......@@ -392,7 +391,6 @@ PinRequestView::PinRequestView(PinRequest request, Delegate* delegate)
submit_button_ = new ArrowButtonView(
base::BindRepeating(&PinRequestView::SubmitCode, base::Unretained(this)),
kArrowButtonSizeDp);
submit_button_->SetBackgroundColor(kArrowButtonColor);
submit_button_->SetPreferredSize(
gfx::Size(kArrowButtonSizeDp, kArrowButtonSizeDp));
submit_button_->SetEnabled(false);
......
......@@ -15,21 +15,6 @@
namespace ash {
namespace {
// The color of the system button's text and icon in alert mode.
constexpr SkColor kSystemButtonContentColorAlert =
SkColorSetA(gfx::kGoogleGrey900, SK_AlphaOPAQUE);
// The background color of the system button in alert mode.
constexpr SkColor kSystemButtonBackgroundColorAlert =
SkColorSetA(gfx::kGoogleRed300, SK_AlphaOPAQUE);
// The color of the system button's text in default mode.
constexpr SkColor kSystemButtonContentColorDefault =
SkColorSetA(gfx::kGoogleGrey200, SK_AlphaOPAQUE);
// The color of the base color used for ink drop in default mode.
constexpr SkColor kInkDropBaseColorDefault = SK_ColorWHITE;
constexpr int kUserInfoBubbleWidth = 192;
constexpr int kUserInfoBubbleExternalPadding = 8;
constexpr int kSystemButtonHeight = 32;
......@@ -62,15 +47,15 @@ SystemLabelButton::SystemLabelButton(PressedCallback callback,
label()->SetMultiLine(true);
label()->SetMaximumWidth(kSystemButtonMaxLabelWidthDp);
}
label()->SetFontList(
gfx::FontList().DeriveWithWeight(gfx::Font::Weight::BOLD));
SetMinSize(gfx::Size(0, kSystemButtonHeight));
SetPaintToLayer();
layer()->SetFillsBoundsOpaquely(false);
if (display_type == DisplayType::ALERT_WITH_ICON) {
SetImage(
views::Button::STATE_NORMAL,
CreateVectorIcon(kLockScreenAlertIcon, kSystemButtonContentColorAlert));
SetImage(views::Button::STATE_NORMAL,
CreateVectorIcon(
kLockScreenAlertIcon,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorAlert)));
}
SetTextSubpixelRenderingEnabled(false);
SetInkDropMode(InkDropMode::ON);
......@@ -109,28 +94,24 @@ void SystemLabelButton::SetDisplayType(DisplayType display_type) {
}
void SystemLabelButton::SetAlertMode(bool alert_mode) {
if (alert_mode)
background_color_ = kSystemButtonBackgroundColorAlert;
else {
background_color_ = AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
}
SkColor font_color = alert_mode ? kSystemButtonContentColorAlert
: kSystemButtonContentColorDefault;
SetEnabledTextColors(font_color);
if (alert_mode) {
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(background_color_);
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
SetInkDropHighlightOpacity(ripple_attributes.highlight_opacity);
} else {
// using RippleAttributes here doesn't give visually satisfying results
// in default display mode
SetInkDropBaseColor(kInkDropBaseColorDefault);
}
background_color_ = AshColorProvider::Get()->GetControlsLayerColor(
alert_mode
? AshColorProvider::ControlsLayerType::kControlBackgroundColorAlert
: AshColorProvider::ControlsLayerType::
kControlBackgroundColorInactive);
label()->SetFontList(gfx::FontList().DeriveWithWeight(
alert_mode ? gfx::Font::Weight::BOLD : gfx::Font::Weight::MEDIUM));
SetEnabledTextColors(AshColorProvider::Get()->GetContentLayerColor(
alert_mode ? AshColorProvider::ContentLayerType::kButtonLabelColorPrimary
: AshColorProvider::ContentLayerType::kButtonLabelColor));
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(background_color_);
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
SetInkDropHighlightOpacity(ripple_attributes.highlight_opacity);
}
} // namespace ash
......@@ -99,20 +99,18 @@ bool HasFocusInAnyChildView(views::View* view) {
}
views::Label* CreateBubbleLabel(const base::string16& message,
SkColor color,
views::View* view_defining_max_width,
int font_size_delta,
gfx::Font::Weight font_weight) {
SkColor color,
const gfx::FontList& font_list,
int line_height) {
views::Label* label =
new views::Label(message, views::style::CONTEXT_DIALOG_BODY_TEXT,
views::style::STYLE_PRIMARY);
new views::Label(message, views::style::CONTEXT_DIALOG_BODY_TEXT);
label->SetAutoColorReadabilityEnabled(false);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
label->SetEnabledColor(color);
label->SetSubpixelRenderingEnabled(false);
const gfx::FontList& base_font_list = views::Label::GetDefaultFontList();
label->SetFontList(base_font_list.Derive(
font_size_delta, gfx::Font::FontStyle::NORMAL, font_weight));
label->SetFontList(font_list);
label->SetLineHeight(line_height);
if (view_defining_max_width != nullptr) {
label->SetMultiLine(true);
label->SetAllowCharacterBreak(true);
......
......@@ -6,6 +6,8 @@
#define ASH_LOGIN_UI_VIEWS_UTILS_H_
#include "ash/ash_export.h"
#include "ash/public/cpp/login_constants.h"
#include "ash/style/ash_color_provider.h"
#include "ui/views/controls/label.h"
namespace views {
......@@ -18,6 +20,20 @@ namespace ash {
namespace login_views_utils {
namespace {
constexpr int kDefaultLineHeight = 20;
// Helper function to get default font list for login/lock screen text label.
// It is slightly different from views::Label::GetDefaultFontList since the
// font size returned is 13 pt instead of 12 pt.
const gfx::FontList GetLoginDefaultFontList() {
return gfx::FontList(
{login_constants::kDefaultFontName}, gfx::Font::FontStyle::NORMAL,
login_constants::kDefaultFontSize, gfx::Font::Weight::NORMAL);
}
} // namespace
// Wraps view in another view so the original view is sized to it's preferred
// size, regardless of the view's parent's layout manager.
ASH_EXPORT std::unique_ptr<views::View> WrapViewForPreferredSize(
......@@ -32,14 +48,14 @@ ASH_EXPORT bool HasFocusInAnyChildView(views::View* view);
// Creates a standard text label for use in the login bubbles.
// If |view_defining_max_width| is set, we allow the label to have multiple
// lines and we set its maximum width to the preferred width of
// |view_defining_max_width|. |font_size_delta| is the size in pixels to add to
// the default font size.
// |view_defining_max_width|.
views::Label* CreateBubbleLabel(
const base::string16& message,
SkColor color,
views::View* view_defining_max_width = nullptr,
int font_size_delta = 0,
gfx::Font::Weight font_weight = gfx::Font::Weight::NORMAL);
SkColor color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary),
const gfx::FontList& font_list = GetLoginDefaultFontList(),
int line_height = kDefaultLineHeight);
// Get the bubble container for |view| to place a LoginBaseBubbleView.
views::View* GetBubbleContainer(views::View* view);
......
......@@ -7,9 +7,9 @@
#include "third_party/skia/include/core/SkColor.h"
// This file exists in //ash/public because the values are shared between webui
// login code in chrome and views-based login code in ash. If the webui login
// code is ever removed this file can move to //ash/login.
// TODO(crbug/1148231): Delete this file, move ash/login/ui constants
// to ash/login/ui/login_constant.h and chrome/browser constants to the
// files where they are used.
namespace ash {
namespace login_constants {
......@@ -22,11 +22,6 @@ constexpr SkColor kDefaultBaseColor = SK_ColorBLACK;
// from the wallpaper is invalid.
constexpr SkColor kLightModeBaseColor = SK_ColorWHITE;
// Color used on text associated with an auth method, e.g., password,
// fingerprint.
constexpr SkColor kAuthMethodsTextColor =
SkColorSetARGB(0xAB, 0xFF, 0xFF, 0xFF);
// When the wallpaper is not blurred, a background with this alpha should
// be rendered behind UI elements so they remain legible.
constexpr int kNonBlurredWallpaperBackgroundAlpha = 0xCC; // 0xCC -> 80% of 255
......@@ -58,6 +53,12 @@ constexpr int kChangeUserAnimationDurationMs = 300;
// In specs this is listed as 34% = 0x57 / 0xFF.
constexpr SkAlpha kButtonDisabledAlpha = 0x57;
// The most used font size on login/lock screen.
constexpr int kDefaultFontSize = 13;
// The most used font on login/lock screen.
constexpr char kDefaultFontName[] = "Roboto";
} // namespace login_constants
} // namespace ash
......
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