Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> | |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis tbox.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis tbox.html"> |
| 5 <link rel="import" href="/controls/pref_control_behavior.html"> | 4 <link rel="import" href="/controls/pref_control_behavior.html"> |
| 6 <link rel="import" href="/i18n_setup.html"> | 5 <link rel="import" href="/i18n_setup.html"> |
| 7 <link rel="import" href="/prefs/pref_util.html"> | 6 <link rel="import" href="/prefs/pref_util.html"> |
| 8 <link rel="import" href="/settings_shared_css.html"> | 7 <link rel="import" href="/settings_shared_css.html"> |
| 9 | 8 |
| 10 <dom-module id="settings-dropdown-menu"> | 9 <dom-module id="settings-dropdown-menu"> |
| 11 <template> | 10 <template> |
| 12 <style include="settings-shared"> | 11 <style include="settings-shared"> |
| 13 paper-item { | 12 .item { |
| 13 align-items: center; | |
| 14 color: var(--paper-grey-800); | 14 color: var(--paper-grey-800); |
| 15 display: flex; | |
| 15 font-size: inherit; | 16 font-size: inherit; |
| 17 min-height: 48px; | |
| 18 padding: 0 16px; | |
| 19 } | |
| 20 | |
| 21 .item:focus { | |
| 22 background-color: var(--paper-grey-300); | |
| 23 outline: none; | |
| 16 } | 24 } |
| 17 | 25 |
| 18 paper-dropdown-menu { | 26 paper-dropdown-menu { |
| 19 --iron-icon-fill-color: var(--paper-grey-600); | 27 --iron-icon-fill-color: var(--paper-grey-600); |
| 20 --paper-font-subhead: { | 28 --paper-font-subhead: { |
| 21 font-size: inherit; | 29 font-size: inherit; |
| 22 }; | 30 }; |
| 23 --paper-input-container-underline: { | 31 --paper-input-container-underline: { |
| 24 background: var(--paper-grey-300); | 32 background: var(--paper-grey-300); |
| 25 }; | 33 }; |
| 26 width: 160px; | 34 width: 160px; |
| 27 } | 35 } |
| 28 </style> | 36 </style> |
| 29 <paper-dropdown-menu id="dropdownMenu" label="[[menuLabel_]]" | 37 <paper-dropdown-menu id="dropdownMenu" label="[[menuLabel_]]" |
| 30 on-iron-select="onSelect_" no-label-float$="[[noLabelFloat]]" | 38 on-iron-select="onSelect_" no-label-float$="[[noLabelFloat]]" |
| 31 disabled="[[shouldDisableMenu_(disabled, menuOptions.*)]]"> | 39 disabled="[[shouldDisableMenu_(disabled, menuOptions.*)]]"> |
| 32 <paper-listbox class="dropdown-content" selected="{{selected_}}" | 40 <paper-listbox class="dropdown-content" selected="{{selected_}}" |
| 33 attr-for-selected="data-value"> | 41 attr-for-selected="data-value"> |
| 34 <template is="dom-repeat" items="[[menuOptions]]"> | 42 <template is="dom-repeat" items="[[menuOptions]]" item-count="5"> |
|
michaelpg
2016/06/29 15:12:15
why not 1?
dpapad
2016/06/29 17:16:26
1 seems a bit extreme in the sense that it would t
| |
| 35 <paper-item data-value$="[[item.value]]">[[item.name]]</paper-item> | 43 <div class="item" data-value$="[[item.value]]">[[item.name]]</div> |
|
michaelpg
2016/06/29 15:12:15
Can you try with a <button class="paper-item" role
dpapad
2016/06/29 17:16:26
Tried your suggestion. I am seeing two problems wi
michaelpg
2016/06/29 18:18:37
Could you upload what you have? It works fine for
| |
| 36 </template> | 44 </template> |
| 37 <paper-item data-value$="[[notFoundValue_]]" | 45 <div class="item" data-value$="[[notFoundValue_]]" |
| 38 hidden$="[[!isSelectedNotFound_(selected_)]]"> | 46 hidden$="[[!isSelectedNotFound_(selected_)]]"> |
| 39 $i18n{custom} | 47 $i18n{custom} |
| 40 </paper-item> | 48 </div> |
| 41 </paper-listbox> | 49 </paper-listbox> |
| 42 </paper-dropdown-menu> | 50 </paper-dropdown-menu> |
| 43 </template> | 51 </template> |
| 44 <script src="settings_dropdown_menu.js"></script> | 52 <script src="settings_dropdown_menu.js"></script> |
| 45 </dom-module> | 53 </dom-module> |
| OLD | NEW |