Commit 208a7b43 authored by David Roger's avatar David Roger Committed by Commit Bot

[signin] Improve style for dice signin interception bubble

Screenshot with this CL:
https://drive.google.com/file/d/1b-x0NrGnycEfV24EQ9pb_vKBHfPc2X60/view

Mock:
https://drive.google.com/file/d/1ckOFYd_eFQ1UK5byLkeXOuNqo0Fskxj2/view?usp=sharing

Bug: 1076880
Change-Id: I5d0b4ab2194899039e97f86a90b1aa3d578bd78d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292300Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Reviewed-by: default avatarAlex Ilin <alexilin@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Auto-Submit: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790393}
parent 5001d092
...@@ -2,6 +2,20 @@ ...@@ -2,6 +2,20 @@
<html dir="$i18n{textdirection}" lang="$i18n{language}"> <html dir="$i18n{textdirection}" lang="$i18n{language}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="chrome://resources/css/md_colors.css">
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<style>
body {
height: 100vh;
margin: 0;
width: 100vw;
}
@media (prefers-color-scheme: dark) {
body {
background-color: var(--md-background-color);
}
}
</style>
</head> </head>
<body> <body>
<dice-web-signin-intercept-app></dice-web-signin-intercept-app> <dice-web-signin-intercept-app></dice-web-signin-intercept-app>
......
<div> <style include="signin-dialog-shared">
<h1>$i18n{diceWebSigninInterceptTitle}</h1> :host {
color: var(--cr-primary-text-color);
display: flex;
flex-direction: column;
height: 100%;
}
#header {
/**
* TODO(crbug.com/1076880): replace the hardcoded background color with the
* browser-provided one.
*/
background-color: rgb(206, 234, 214);
border-radius: 8px;
margin: 8px;
min-height: 128px;
}
#body {
flex-grow: 1;
font-size: 13px;
line-height: 20px;
margin: 0 16px;
}
#title {
font-size: 15px;
font-weight: 500;
line-height: 22px;
margin: 0 0 8px;
}
cr-button {
font-size: 12px;
}
</style>
<div id="header"></div>
<div id="body">
<div id="title">$i18n{diceWebSigninInterceptTitle}</div>
<div>$i18n{diceWebSigninInterceptDesc}</div> <div>$i18n{diceWebSigninInterceptDesc}</div>
</div> </div>
<div>
<cr-button id="cancelButton" on-click="onCancel_"> <div class="action-container">
$i18n{diceWebSigninInterceptCancelLabel}
</cr-button>
<cr-button id="acceptButton" class="action-button" on-click="onAccept_" <cr-button id="acceptButton" class="action-button" on-click="onAccept_"
autofocus> autofocus>
$i18n{diceWebSigninInterceptAcceptLabel} $i18n{diceWebSigninInterceptAcceptLabel}
</cr-button> </cr-button>
<cr-button id="cancelButton" on-click="onCancel_">
$i18n{diceWebSigninInterceptCancelLabel}
</cr-button>
</div> </div>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; import 'chrome://resources/cr_elements/cr_button/cr_button.m.js';
import './strings.m.js'; import './strings.m.js';
import './signin_shared_css.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
namespace { namespace {
constexpr int kInterceptionBubbleHeight = 362; constexpr int kInterceptionBubbleHeight = 342;
constexpr int kInterceptionBubbleWidth = 290; constexpr int kInterceptionBubbleWidth = 290;
} // namespace } // namespace
......
...@@ -26,6 +26,7 @@ DiceWebSigninInterceptUI::DiceWebSigninInterceptUI(content::WebUI* web_ui) ...@@ -26,6 +26,7 @@ DiceWebSigninInterceptUI::DiceWebSigninInterceptUI(content::WebUI* web_ui)
IDR_SIGNIN_DICE_WEB_INTERCEPT_APP_JS); IDR_SIGNIN_DICE_WEB_INTERCEPT_APP_JS);
source->AddResourcePath("dice_web_signin_intercept_browser_proxy.js", source->AddResourcePath("dice_web_signin_intercept_browser_proxy.js",
IDR_SIGNIN_DICE_WEB_INTERCEPT_BROWSER_PROXY_JS); IDR_SIGNIN_DICE_WEB_INTERCEPT_BROWSER_PROXY_JS);
source->AddResourcePath("signin_shared_css.js", IDR_SIGNIN_SHARED_CSS_JS);
// Localized strings. // Localized strings.
source->UseStringsJs(); source->UseStringsJs();
......
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