Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4182)

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html

Issue 2256773005: MD Settings: Bluetooth: Use CrScrollableBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_638377_scrollable_behavior
Patch Set: Improve item focus and fix tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
index fb75e24ecc24d9a40fd3a1b9ed096531a92c4bb6..479d1911f77337598ed4cbcb397e7d9d76a2e01c 100644
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
@@ -1,8 +1,9 @@
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
+<link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.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-input/paper-input.html">
@@ -26,10 +27,6 @@
margin-top: 10px;
}
- iron-selector {
- width: 100%;
- }
-
paper-spinner {
height: 20px;
margin: 0 10px;
@@ -41,8 +38,7 @@
}
div.contents {
- max-height: 250px;
- min-height: 250px;
+ height: 250px;
}
/* .display indicates a displayed pin code or passkey. */
@@ -85,22 +81,27 @@
<div class="title">[[getTitle_(dialogId)]]</div>
<div class="body">
<div class="contents layout vertical center center-justified">
- <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]">
- <div id="dialogDeviceList"
- class="layout vertical flex start self-stretch"
- on-device-event="onDeviceEvent_">
- <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]">
- $i18n{bluetoothNoDevices}
- </span>
- <iron-selector class="flex">
- <template is="dom-repeat" items="[[deviceList]]"
- filter="deviceNotPaired_" observe="paired">
- <bluetooth-device-list-item device="[[item]]">
+ <!-- Note: dialog + dom-if + iron-list makes sizing complicated so use
+ hidden here; this is almost always the first dialog shown. -->
+ <div id="dialogDeviceList"
+ hidden$="[[!isDialogType_(dialogId, 'addDevice')]]"
+ class="layout vertical flex start self-stretch">
+ <span class="no-devices" hidden$="[[haveUnpaired_(deviceList.*)]]">
+ $i18n{bluetoothNoDevices}
+ </span>
+ <div id="container" class="layout vertical flex self-stretch"
+ scrollable>
+ <iron-list items="[[getUnpaired_(deviceList.*)]]"
+ selection-enabled selected-item="{{selectedItem}}"
+ scroll-target="container" tabindex="0">
+ <template>
+ <bluetooth-device-list-item device="[[item]]"
+ tabindex$="[[tabIndex]]">
</bluetooth-device-list-item>
</template>
- </iron-selector>
+ </iron-list>
</div>
- </template>
+ </div>
<template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]">
<div id="pairing" class="settings-box first layout vertical center
center-justified">
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698