Commit 23e1aae3 authored by dpapad's avatar dpapad Committed by Commit bot

MD Settings: Adjusting reset-page dialogs styling to match latest mocks.

Refactor both dialogs such that CSS styles can be shared
between them (see reset_page_dialog.css).

BUG=546840

Review URL: https://codereview.chromium.org/1482573002

Cr-Commit-Position: refs/heads/master@{#363044}
parent 541795c1
...@@ -5,18 +5,26 @@ ...@@ -5,18 +5,26 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html">
<dom-module id="settings-powerwash-dialog"> <dom-module id="settings-powerwash-dialog">
<link rel="import" type="css" href="reset_page_dialog.css">
<template> <template>
<paper-dialog modal id="dialog"> <paper-dialog modal id="dialog">
<h2 i18n-content="powerwashDialogTitle"></h2> <div id="dialog-content">
<div i18n-content="powerwashDialogBody"></div> <div class="dialog-title"
<div class="layout center horizontal" id="buttonContainer"> i18n-content="powerwashDialogTitle"></div>
<div class="dialog-body">
<div class="explanation"
i18n-content="powerwashDialogExplanation"></div>
<div class="button-container">
<paper-button i18n-content="learnMore" <paper-button i18n-content="learnMore"
on-tap="onLearnMoreTap_" id="learnMore"></paper-button> on-tap="onLearnMoreTap_" id="learnMore"></paper-button>
<div class="layout center buttons flex-1"> <div class="action-buttons">
<paper-button on-tap="onCancelTap_" id="cancel" <paper-button class="cancel-button" on-tap="onCancelTap_"
i18n-content="cancel"></paper-button> id="cancel" i18n-content="cancel"></paper-button>
<paper-button on-tap="onRestartTap_" id="powerwash" <paper-button class="action-button" id="powerwash"
i18n-content="powerwashDialogButton"></paper-button> on-tap="onRestartTap_" i18n-content="powerwashDialogButton">
</paper-button>
</div>
</div>
</div> </div>
</div> </div>
</paper-dialog> </paper-dialog>
......
/* Copyright 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
#dialog-content {
-webkit-padding-end: 0;
-webkit-padding-start: 0;
margin-top: 0;
}
.dialog-title {
border-bottom: 1px solid gainsboro;
font-size: 1.13em;
padding-bottom: 14px;
padding-top: 14px;
}
.dialog-body {
font-size: 1em;
margin: 20px 0;
}
.dialog-title,
.dialog-body {
-webkit-padding-end: 24px;
-webkit-padding-start: 24px;
}
.button-container {
display: flex;
}
.action-button {
-webkit-margin-start: 10px;
background-color: rgb(66, 133, 244);
color: white;
font-weight: 500;
}
.cancel-button {
color: rgb(66, 133, 244);
font-weight: 500;
}
paper-button {
margin: 0;
}
.explanation {
margin-bottom: 35px;
}
.action-buttons {
display: flex;
flex: 1;
justify-content: flex-end;
}
...@@ -7,25 +7,9 @@ ...@@ -7,25 +7,9 @@
width: 500px; width: 500px;
} }
#reset { #learnMore {
-webkit-margin-start: 10px;
-webkit-padding-end: 15px;
-webkit-padding-start: 15px;
background-color: rgb(120, 120, 120);
color: white;
}
#learnMore,
#cancel {
color: rgb(94, 94, 94); color: rgb(94, 94, 94);
} font-weight: 500;
#explanation {
margin: 10px 0;
}
#buttonContainer {
margin: 15px 0;
} }
#feedbackBar { #feedbackBar {
......
...@@ -6,21 +6,25 @@ ...@@ -6,21 +6,25 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html">
<dom-module id="settings-reset-profile-dialog"> <dom-module id="settings-reset-profile-dialog">
<link rel="import" type="css" href="reset_page_dialog.css">
<link rel="import" type="css" href="reset_profile_dialog.css"> <link rel="import" type="css" href="reset_profile_dialog.css">
<template> <template>
<paper-dialog modal id="dialog"> <paper-dialog modal id="dialog">
<div> <div id="dialog-content">
<h2 i18n-content="resetPageTitle"></h2> <div class="dialog-title"
<div i18n-content="resetPageExplanation" id="explanation"></div> i18n-content="resetPageTitle"></div>
<div class="layout center horizontal" id="buttonContainer"> <div class="dialog-body">
<div class="explanation" i18n-content="resetPageExplanation"></div>
<div class="button-container">
<paper-button on-tap="onLearnMoreTap_" id="learnMore" <paper-button on-tap="onLearnMoreTap_" id="learnMore"
i18n-content="learnMore"></paper-button> i18n-content="learnMore"></paper-button>
<div class="layout center buttons flex-1"> <div class="action-buttons">
<paper-spinner id="resetSpinner"></paper-spinner> <paper-spinner id="resetSpinner"></paper-spinner>
<paper-button on-tap="onCancelTap_" id="cancel" <paper-button class="cancel-button" on-tap="onCancelTap_"
i18n-content="cancel"></paper-button> id="cancel" i18n-content="cancel"></paper-button>
<paper-button i18n-content="resetPageCommit" on-tap="onResetTap_" <paper-button class="action-button" i18n-content="resetPageCommit"
id="reset"></paper-button> on-tap="onResetTap_" id="reset"></paper-button>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -232,6 +232,9 @@ ...@@ -232,6 +232,9 @@
<structure name="IDR_SETTINGS_POWERWASH_DIALOG_JS" <structure name="IDR_SETTINGS_POWERWASH_DIALOG_JS"
file="reset_page/powerwash_dialog.js" file="reset_page/powerwash_dialog.js"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_SETTINGS_RESET_PAGE_DIALOG_CSS"
file="reset_page/reset_page_dialog.css"
type="chrome_html" />
<structure name="IDR_SETTINGS_RESET_PAGE_HTML" <structure name="IDR_SETTINGS_RESET_PAGE_HTML"
file="reset_page/reset_page.html" file="reset_page/reset_page.html"
type="chrome_html" type="chrome_html"
......
...@@ -272,7 +272,7 @@ void AddResetStrings(content::WebUIDataSource* html_source) { ...@@ -272,7 +272,7 @@ void AddResetStrings(content::WebUIDataSource* html_source) {
html_source->AddLocalizedString( html_source->AddLocalizedString(
"powerwashDialogTitle", IDS_OPTIONS_FACTORY_RESET_HEADING); "powerwashDialogTitle", IDS_OPTIONS_FACTORY_RESET_HEADING);
html_source->AddLocalizedString( html_source->AddLocalizedString(
"powerwashDialogBody", IDS_OPTIONS_FACTORY_RESET_WARNING); "powerwashDialogExplanation", IDS_OPTIONS_FACTORY_RESET_WARNING);
html_source->AddLocalizedString( html_source->AddLocalizedString(
"powerwashDialogButton", IDS_RELAUNCH_BUTTON); "powerwashDialogButton", IDS_RELAUNCH_BUTTON);
html_source->AddLocalizedString( html_source->AddLocalizedString(
......
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