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

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

Issue 2207283002: DevTools: make sidebar section headers wider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js b/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
index 5f79c4cd59a082013226e3bfc93c03b3108bf816..df45b20703508cc216e4341717710ea5b7099513 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
@@ -44,12 +44,13 @@ WebInspector.View._ExpandableContainerWidget = function(view, expanded)
this._titleElement.addEventListener("click", this._toggleExpanded.bind(this), false);
this._titleElement.addEventListener("keydown", this._onTitleKeyDown.bind(this), false);
this.contentElement.insertBefore(this._titleElement, this.contentElement.firstChild);
+
var toolbarElement = this.contentElement.createChild("div");
var toolbarItems = view.toolbarItems();
if (toolbarItems.length) {
- var toolbar = new WebInspector.Toolbar("", this._titleElement);
+ this._toolbar = new WebInspector.Toolbar("");
for (var item of toolbarItems)
- toolbar.appendToolbarItem(item);
+ this._toolbar.appendToolbarItem(item);
}
this.contentElement.createChild("content");
@@ -72,6 +73,8 @@ WebInspector.View._ExpandableContainerWidget.prototype = {
{
if (this._titleElement.classList.contains("expanded"))
return true;
+ if (this._toolbar)
+ this._titleElement.appendChild(this._toolbar.element);
this._titleElement.classList.add("expanded");
this._view.showWidget(this.element);
return true;
@@ -81,6 +84,8 @@ WebInspector.View._ExpandableContainerWidget.prototype = {
{
if (!this._titleElement.classList.contains("expanded"))
return;
+ if (this._toolbar)
+ this._toolbar.element.remove();
this._titleElement.classList.remove("expanded");
this._view.hideWidget();
},

Powered by Google App Engine
This is Rietveld 408576698