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

Unified Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html

Issue 2280513002: MD History: promote menu button to show clear browsing data in narrow mode (Closed)
Patch Set: !showingSearch_ Created 4 years, 3 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
Index: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
index 28200326d9545b53e8d4504805e5f8b19c79a8cb..af94e7933034a465a1807e6581120f3f733ab996 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
@@ -1,7 +1,10 @@
<link rel="import" href="chrome://resources/html/polymer.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-media-query/iron-media-query.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-tooltip/paper-tooltip.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html">
+<link rel="import" href="chrome://resources/cr_elements/icons.html">
<dom-module id="cr-toolbar">
<template>
@@ -71,12 +74,48 @@
:host([narrow_][showing-search_]) #leftContent {
opacity: 0;
}
+
+ paper-tooltip {
+ --paper-tooltip: {
+ align-items: center;
+ display: flex;
+ font-size: 92.3%;
+ font-weight: 500;
+ padding: 6px 12px 6px 8px;
+ white-space: nowrap;
+ };
+ }
+
+ iron-icon {
+ --iron-icon-height: 20px;
+ --iron-icon-width: 20px;
+ -webkit-margin-start: 12px;
+ }
+
+ .arrow {
+ -webkit-clip-path: polygon(0 100%, 100% 100%, 50% 0); /* Up arrow. */
+ background: inherit;
+ left: 10px;
+ height: 6px;
+ position: absolute;
+ top: -6px;
+ width: 12px;
+ }
</style>
<div id="leftContent">
<template is="dom-if" if="[[showMenu]]">
<paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_"
- title="[[menuLabel]]">
+ title="[[titleIfNotShowMenuPromo_(menuLabel, showMenuPromo)]]">
tsergeant 2016/09/09 06:09:39 Can you add `aria-label$="[[menuLabel]]"` so that
Dan Beam 2016/09/16 00:01:24 Done.
</paper-icon-button>
+ <template is="dom-if" if="[[showMenuPromo]]">
+ <paper-tooltip for="menuButton" position="bottom" offset="20"
+ manual-mode fit-to-visible-bounds>
+ <div class="arrow"></div>
+ [[menuPromo]]
+ <iron-icon icon="cr:clear" on-tap="onMenuPromoCloseTap_">
+ </iron-icon>
+ </paper-tooltip>
+ </template>
</template>
<h1>[[pageName]]</h1>
</div>

Powered by Google App Engine
This is Rietveld 408576698