Commit c247ff5a authored by Michael Checo's avatar Michael Checo Committed by Commit Bot

Scanning: Add instructions to scan preview

Spec: http://shortn/_3CsQ13LODA
Screenshot: http://shortn/_wsgjicXnSz

Bug: 1059779
Test: browser_tests --gtest_filter=ScanningAppBrowserTest.All
Change-Id: Ifc823668a2576e3dc36d08494c06f75db53d83db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511490
Commit-Queue: Michael Checo <michaelcheco@google.com>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823579}
parent c19a97e9
...@@ -513,6 +513,9 @@ Try tapping the mic to ask me anything. ...@@ -513,6 +513,9 @@ Try tapping the mic to ask me anything.
<message name="IDS_SCANNING_APP_MORE_SETTINGS" desc="The text displayed for the button that shows and hides additional settings."> <message name="IDS_SCANNING_APP_MORE_SETTINGS" desc="The text displayed for the button that shows and hides additional settings.">
More settings More settings
</message> </message>
<message name="IDS_SCANNING_APP_SCAN_PREVIEW_HELPER_TEXT" desc="The text displayed in the scan preview that explains how to scan a document.">
Place your document, and click Scan to get started
</message>
<!-- Diagnostics App --> <!-- Diagnostics App -->
<!-- TODO(michaelcheco): Update with finalized copies of the strings --> <!-- TODO(michaelcheco): Update with finalized copies of the strings -->
......
f4d29a856ed9ae3ff26fc5a7da5c4cb3b684834c
\ No newline at end of file
<style include="scanning-shared"> <style include="scanning-shared scanning-fonts">
#helperText {
@apply --scanning-helper-text-font;
color: var(--scanning-helper-text-color);
text-align-last: center;
width: 60%;
}
.preview { .preview {
align-items: center;
border: 1px solid var(--google-grey-200); border: 1px solid var(--google-grey-200);
border-radius: 4px; border-radius: 4px;
display: flex;
/* TODO(michaelcheco): Replace with correct height for /* TODO(michaelcheco): Replace with correct height for
* preview container. */ * preview container. */
height: 420px; height: 420px;
justify-content: center;
} }
</style> </style>
<div class="preview"></div> <div class="preview">
\ No newline at end of file <div id="helperText">[[i18n('scanPreviewHelperText')]]</div>
</div>
\ No newline at end of file
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import './scanning_fonts_css.js';
import './scanning_shared_css.js'; import './scanning_shared_css.js';
import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.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';
/** /**
...@@ -14,4 +16,6 @@ Polymer({ ...@@ -14,4 +16,6 @@ Polymer({
is: 'scan-preview', is: 'scan-preview',
_template: html`{__html_template__}`, _template: html`{__html_template__}`,
behaviors: [I18nBehavior],
}); });
<template> <template>
<style> <style>
:host { :host {
--scanning-helper-text-font-family: "Google Sans", Roboto, sans-serif;
--scanning-more-settings-font-family: Roboto; --scanning-more-settings-font-family: Roboto;
--scanning-section-title-font-family: "Google Sans", Roboto, sans-serif; --scanning-section-title-font-family: "Google Sans", Roboto, sans-serif;
--scanning-select-font-family: Roboto; --scanning-select-font-family: Roboto;
--scanning-chevron-icon-font-size: 20px; --scanning-chevron-icon-font-size: 20px;
--scanning-helper-text-font-size: 16px;
--scanning-more-settings-font-size: 12px; --scanning-more-settings-font-size: 12px;
--scanning-section-title-font-size: 22px; --scanning-section-title-font-size: 22px;
--scanning-select-font-size: 13px; --scanning-select-font-size: 13px;
--scanning-chevron-icon-color: var(--google-grey-700); --scanning-chevron-icon-color: var(--google-grey-700);
--scanning-helper-text-color: var(--google-grey-700);
--scanning-more-settings-text-color: var(--google-grey-700); --scanning-more-settings-text-color: var(--google-grey-700);
--scanning-section-title-text-color: var(--google-grey-900); --scanning-section-title-text-color: var(--google-grey-900);
--scanning-select-text-color: var(--google-grey-900); --scanning-select-text-color: var(--google-grey-900);
...@@ -24,6 +27,11 @@ ...@@ -24,6 +27,11 @@
font-family: var(--scanning-select-font-family); font-family: var(--scanning-select-font-family);
font-size: var(--scanning-select-font-size); font-size: var(--scanning-select-font-size);
}; };
--scanning-helper-text-font: {
font-family: var(--scanning-helper-text-font-family);
font-size: var(--scanning-helper-text-font-size);
}
} }
</style> </style>
</template> </template>
\ No newline at end of file
...@@ -61,6 +61,7 @@ void AddScanningAppStrings(content::WebUIDataSource* html_source) { ...@@ -61,6 +61,7 @@ void AddScanningAppStrings(content::WebUIDataSource* html_source) {
{"pageSizeDropdownLabel", IDS_SCANNING_APP_PAGE_SIZE_DROPDOWN_LABEL}, {"pageSizeDropdownLabel", IDS_SCANNING_APP_PAGE_SIZE_DROPDOWN_LABEL},
{"resolutionDropdownLabel", IDS_SCANNING_APP_RESOLUTION_DROPDOWN_LABEL}, {"resolutionDropdownLabel", IDS_SCANNING_APP_RESOLUTION_DROPDOWN_LABEL},
{"resolutionOptionText", IDS_SCANNING_APP_RESOLUTION_OPTION_TEXT}, {"resolutionOptionText", IDS_SCANNING_APP_RESOLUTION_OPTION_TEXT},
{"scanPreviewHelperText", IDS_SCANNING_APP_SCAN_PREVIEW_HELPER_TEXT},
{"scanToDropdownLabel", IDS_SCANNING_APP_SCAN_TO_DROPDOWN_LABEL}, {"scanToDropdownLabel", IDS_SCANNING_APP_SCAN_TO_DROPDOWN_LABEL},
{"scannerDropdownLabel", IDS_SCANNING_APP_SCANNER_DROPDOWN_LABEL}, {"scannerDropdownLabel", IDS_SCANNING_APP_SCANNER_DROPDOWN_LABEL},
{"selectFolderOption", IDS_SCANNING_APP_SELECT_FOLDER_OPTION}, {"selectFolderOption", IDS_SCANNING_APP_SELECT_FOLDER_OPTION},
......
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