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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/View.js

Issue 2654043004: DevTools: migrate UI.ViewManager's expand icon over to UI.Icon (Closed)
Patch Set: Created 3 years, 11 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 | third_party/WebKit/Source/devtools/front_end/ui/viewContainers.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/View.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index 1e157e93944925775162f6d7471b53d555ab1a87..cbad41670f8326bf64d694180da57f80ed5196a0 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -464,7 +464,9 @@ UI.ViewManager._ExpandableContainerWidget = class extends UI.VBox {
this.registerRequiredCSS('ui/viewContainers.css');
this._titleElement = createElementWithClass('div', 'expandable-view-title');
- this._titleElement.textContent = view.title();
+ this._titleExpandIcon = UI.Icon.create('smallicon-triangle-right', 'title-expand-icon');
+ this._titleElement.appendChild(this._titleExpandIcon);
+ this._titleElement.createTextChild(view.title());
this._titleElement.tabIndex = 0;
this._titleElement.addEventListener('click', this._toggleExpanded.bind(this), false);
this._titleElement.addEventListener('keydown', this._onTitleKeyDown.bind(this), false);
@@ -500,6 +502,7 @@ UI.ViewManager._ExpandableContainerWidget = class extends UI.VBox {
if (this._titleElement.classList.contains('expanded'))
return this._materialize();
this._titleElement.classList.add('expanded');
+ this._titleExpandIcon.setIconType('smallicon-triangle-down');
return this._materialize().then(() => this._widget.show(this.element));
}
@@ -507,6 +510,7 @@ UI.ViewManager._ExpandableContainerWidget = class extends UI.VBox {
if (!this._titleElement.classList.contains('expanded'))
return;
this._titleElement.classList.remove('expanded');
+ this._titleExpandIcon.setIconType('smallicon-triangle-right');
this._materialize().then(() => this._widget.detach());
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/viewContainers.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698