Commit 02bee6d1 authored by Dave Schuyler's avatar Dave Schuyler Committed by Commit Bot

[MD extensions] remove use of paper-menu

This Cl replaces the use of paper-menu in MD extensions with an
iron-selector

Bug: 779282
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I424fbced792781e1ad2a063ab50ce9a93f156660
Reviewed-on: https://chromium-review.googlesource.com/762107Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515466}
parent 76346c14
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/html/cr.html"> <link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="navigation_helper.html"> <link rel="import" href="navigation_helper.html">
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
white-space: nowrap; white-space: nowrap;
} }
iron-selector .iron-selected {
color: var(--google-blue-700);
}
#section-menu { #section-menu {
--paper-menu-background-color: transparent; --paper-menu-background-color: transparent;
--paper-menu-selected-item: { --paper-menu-selected-item: {
...@@ -53,7 +57,7 @@ ...@@ -53,7 +57,7 @@
width: 15px; width: 15px;
} }
</style> </style>
<paper-menu id="section-menu" selected="{{selected_}}"> <iron-selector id="sectionMenu">
<div class="section-item" id="sections-extensions" <div class="section-item" id="sections-extensions"
on-tap="onExtensionsTap_"> on-tap="onExtensionsTap_">
$i18n{sidebarExtensions} $i18n{sidebarExtensions}
...@@ -62,7 +66,7 @@ ...@@ -62,7 +66,7 @@
on-tap="onKeyboardShortcutsTap_"> on-tap="onKeyboardShortcutsTap_">
$i18n{keyboardShortcuts} $i18n{keyboardShortcuts}
</div> </div>
</paper-menu> </iron-selector>
<a class="section-item" id="more-extensions" target="_blank" <a class="section-item" id="more-extensions" target="_blank"
href="$i18n{getMoreExtensionsUrl}"> href="$i18n{getMoreExtensionsUrl}">
<span>$i18n{getMoreExtensions}</span> <span>$i18n{getMoreExtensions}</span>
......
...@@ -5,22 +5,15 @@ cr.define('extensions', function() { ...@@ -5,22 +5,15 @@ cr.define('extensions', function() {
const Sidebar = Polymer({ const Sidebar = Polymer({
is: 'extensions-sidebar', is: 'extensions-sidebar',
properties: {
/** @private {number} */
selected_: {
type: Number,
value: -1,
},
},
hostAttributes: { hostAttributes: {
role: 'navigation', role: 'navigation',
}, },
/** @override */ /** @override */
attached: function() { attached: function() {
this.selected_ = this.$.sectionMenu.select(
extensions.navigation.getCurrentPage().page == Page.SHORTCUTS ? 1 : 0; extensions.navigation.getCurrentPage().page == Page.SHORTCUTS ? 1 :
0);
}, },
/** @private */ /** @private */
......
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