Chromium Code Reviews| Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html |
| diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html |
| index e7b82734a3da84013a29ff9cba143f78d5d9bf0a..1e59ce7e0a96938c8f2ec816a7a9328f0b82c3ba 100644 |
| --- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html |
| +++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html |
| @@ -6,6 +6,7 @@ |
| <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| <link rel="import" href="chrome://resources/html/polymer.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-iconset-svg.html"> |
| @@ -17,9 +18,15 @@ |
| Inlined from Polymer's iron-icons to avoid importing everything. |
| See http://goo.gl/Y1OdAq for instructions on adding additional icons. |
| --> |
| - <g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"></path></g> |
| - </defs> |
| - </svg> |
| + <g id="arrow-forward"> |
| + <path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"> |
| + </path> |
| + </g> |
| + <g id="backspace"> |
| + <path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"> |
| + </g> |
| + </defs> |
|
jdufault
2016/08/26 19:59:18
Undo indent changes
sammiequon
2016/08/26 21:56:44
Done.
|
| +</svg> |
| </iron-iconset-svg> |
| <dom-module id="pin-keyboard"> |
| @@ -30,10 +37,6 @@ |
| display: flex; |
| } |
| - .input-non-pin { |
| - direction: rtl; |
| - } |
| - |
| .row { |
| display: flex; |
| } |
| @@ -41,68 +44,60 @@ |
| .digit-button { |
| align-items: center; |
| background: none; |
| - border-radius: 20px; |
| + border-radius: 100px; |
| box-sizing: border-box; |
| - color: var(--paper-blue-grey-700); |
| + color: #000; |
| display: flex; |
| flex-direction: column; |
| - font-size: 32px; |
| - height: 70px; |
| + font-size: 18px; |
| + height: 48px; |
| justify-content: center; |
| - margin: 0; |
| - min-height: 70px; |
| - min-width: 70px; |
| - padding: 15px 20px; |
| - width: 70px; |
| + margin: 0 6px; |
| + min-height: 48px; |
| + min-width: 48px; |
| + opacity: 0.87; |
| + padding: 15px; |
| + width: 48px; |
| } |
| - .digit-button.clear-button { |
| - display: block; |
| + .digit-button[hidden] { |
|
xiyuan
2016/08/26 21:11:31
nit: Should we use [hidden=true]? Would it work as
jdufault
2016/08/26 21:25:29
+1, also pull it away from just .digit-button, ie,
sammiequon
2016/08/26 21:56:44
Done.
sammiequon
2016/08/26 21:56:44
Done.
|
| + display: none; |
| } |
| - .digit-button.center-button { |
| - margin: 0 30px; |
| + .bottom-row { |
| + margin-bottom: 6px; |
| } |
| - .digit-button.submit-button { |
| - left: 20px; |
| - position: relative; |
| + .top-row { |
| + margin-top: 6px; |
| } |
| - .digit-button.submit-button.submit-button-hidden { |
| - display: none; |
| + .digit-button.backspace-button { |
| + opacity: var(--dark-primary-opacity); |
| } |
| - .digit-button .icon-container { |
| - background: var(--paper-grey-400); |
| - border-radius: 100px; |
| - height: 24px; |
| - margin: auto; |
| - width: 24px; |
| - } |
| - |
| - .digit-button .icon-container.ready-background { |
| - background: var(--paper-blue-800); |
| + .digit-button.backspace-button[disabled] { |
| + color: #000; |
| + opacity: 0.26; |
| + padding: 14px; |
| } |
| - .digit-button .icon-container .icon { |
| - color: white; |
| - display: block; |
| - height: 16px; |
| - left: 4px; |
| - top: 4px; |
| - width: 16px; |
| + .digit-button.submit-button { |
| + color: var(--google-blue-500); |
| + height: 43px; |
| + left: 137px; |
| + margin: 0; |
| + min-height: 43px; |
| + min-width: 43px; |
| + opacity: var(--light-primary-opacity); |
| + padding: 11.5px 10px; |
| + position: absolute; |
| + width: 43px; |
| } |
| - .digit-button .icon-subheading { |
| - color: var(--paper-grey-400); |
| - font-size: 10px; |
| - left: 0; |
| - position: absolute; |
| - text-align: center; |
| - text-transform: capitalize; |
| - top: 44px; |
| - width: 100%; |
| + .digit-button.submit-button[disabled] { |
| + color: #000; |
| + opacity: 0.26; |
| } |
| .digit-button inner-text { |
| @@ -112,31 +107,44 @@ |
| height: 52px; |
| } |
| - .first-row { |
| - height: 64px; |
| - min-height: 64px; |
| - padding: 28px 15px 12px 15px; |
| - } |
| - |
| #pin-input { |
| -webkit-text-security: disc; |
| background-color: white; |
| border: 0; |
| box-sizing: border-box; |
| - font-size: 18px; |
| - height: 64px; |
| - left: 20px; |
| + font-face: Roboto-Regular; |
| + font-size: 13px; |
| + height: 43px; |
| + left: 10px; |
| + opacity: var(--dark-secondary-opacity); |
| outline: 0; |
| - padding: 28px 3px 12px 3px; |
| position: relative; |
| - width: 180px; |
| + text-color: #000; |
| + width: 127px; |
| + } |
| + |
| + #pin-input[has-content] { |
| + opacity: var(--dark-primary-opacity); |
| } |
| - #pin-input.submit-button-hidden { |
| - border-bottom: 2px; |
| - border-bottom-style: solid; |
| + #pin-input[is-input-rtl] { |
| + direction: rtl; |
| + } |
| + |
| + :host(:not([enable-submit-button])) #pin-input { |
| + left: 0; |
| text-align: center; |
| - width: 230px; |
| + width: 180px; |
| + } |
| + |
| + hr { |
| + border: 0; |
| + border-bottom: 1px solid #000; |
| + left: 10px; |
| + margin: 0; |
| + opacity: 0.14; |
| + position: relative; |
| + width: 160px; |
| } |
| #pin-input[type=number]::-webkit-inner-spin-button, |
| @@ -156,26 +164,25 @@ |
| <div id="container-constrained-width"> |
| <div class="row"> |
| <input id="pin-input" type="[[getInputType_(enablePassword)]]" |
| - class$="[[getInputClass_(value)]] |
| - [[getSubmitHiddenClass_(enableSubmitButton)]]" |
| + is-input-rtl$="[[isInputRtl_(value)]]" |
| + has-content$="[[hasInput_(value)]]" |
| placeholder="[[getInputPlaceholder_(enablePassword)]]" |
| value="{{value::input}}" |
| - on-keydown="onInputKeyDown_"></input> |
| - <paper-button class$="digit-button first-row submit-button |
| - [[getSubmitHiddenClass_(enableSubmitButton)]]" |
| - on-tap="firePinSubmitEvent_"> |
| - <div class$="icon-container [[getSubmitClass_(value)]]"> |
| - <iron-icon class="icon" icon="pin-keyboard:forward"><iron-icon> |
| - </div> |
| - </paper-button> |
| + on-keydown="onInputKeyDown_"> |
| + </input> |
| + <paper-icon-button icon="pin-keyboard:arrow-forward" |
| + class="digit-button submit-button" |
| + disabled="[[!hasInput_(value)]]" |
| + hidden="[[!enableSubmitButton]]" |
| + on-tap="firePinSubmitEvent_"> |
| + </paper-icon-button> |
| </div> |
| - |
| - <div class="row keyboard"> |
| + <hr> |
| + <div class="row keyboard top-row"> |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="1"> |
| <inner-text>$i18n{pinKeyboard1}</inner-text> |
| </paper-button> |
| - <paper-button class="digit-button center-button" on-tap="onNumberTap_" |
| - value="2"> |
| + <paper-button class="digit-button" on-tap="onNumberTap_" value="2"> |
| <inner-text>$i18n{pinKeyboard2}</inner-text> |
| </paper-button> |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="3"> |
| @@ -186,8 +193,7 @@ |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="4"> |
| <inner-text>$i18n{pinKeyboard4}</inner-text> |
| </paper-button> |
| - <paper-button class="digit-button center-button" on-tap="onNumberTap_" |
| - value="5"> |
| + <paper-button class="digit-button" on-tap="onNumberTap_" value="5"> |
| <inner-text>$i18n{pinKeyboard5}</inner-text> |
| </paper-button> |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="6"> |
| @@ -198,28 +204,22 @@ |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="7"> |
| <inner-text>$i18n{pinKeyboard7}</inner-text> |
| </paper-button> |
| - <paper-button class="digit-button center-button" on-tap="onNumberTap_" |
| - value="8"> |
| + <paper-button class="digit-button" on-tap="onNumberTap_" value="8"> |
| <inner-text>$i18n{pinKeyboard8}</inner-text> |
| </paper-button> |
| <paper-button class="digit-button" on-tap="onNumberTap_" value="9"> |
| <inner-text>$i18n{pinKeyboard9}</inner-text> |
| </paper-button> |
| </div> |
| - <div class="row keyboard"> |
| + <div class="row keyboard bottom-row"> |
| <div class="digit-button"></div> |
| - <paper-button class="digit-button center-button" on-tap="onNumberTap_" |
| - value="0"> |
| + <paper-button class="digit-button" on-tap="onNumberTap_" value="0"> |
| <inner-text>$i18n{pinKeyboard0}</inner-text> |
| </paper-button> |
| - <paper-button class="digit-button clear-button" on-tap="onPinClear_"> |
| - <div class="icon-container"> |
| - <iron-icon class="icon" icon="cr:clear"><iron-icon> |
| - </div> |
| - <inner-text class="icon-subheading"> |
| - $i18n{pinKeyboardClear} |
| - </inner-text> |
| - </paper-button> |
| + <paper-icon-button class="digit-button backspace-button" |
| + disabled="[[!hasInput_(value)]]" |
| + on-tap="onPinClear_" icon="pin-keyboard:backspace"> |
| + </paper-icon-button> |
| </div> |
| </div> |
| </div> |