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

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

Issue 2482593003: DevTools: eliminate ToolbarButton.setState method; cleanup toolbar.css (Closed)
Patch Set: kill ToolbarToggle.setActive() Created 4 years, 1 month 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/SplitWidget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
index 67617709249b2a6cb1e64f3c50a3a793acd1adef..7f5c1e5dc3cbdce495e8139818edfe44c7243587 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
@@ -833,7 +833,7 @@ WebInspector.SplitWidget = class extends WebInspector.Widget {
*/
createShowHideSidebarButton(title) {
this._showHideSidebarButtonTitle = WebInspector.UIString(title);
- this._showHideSidebarButton = new WebInspector.ToolbarButton('', 'sidebar-toolbar-item');
+ this._showHideSidebarButton = new WebInspector.ToolbarButton('', '');
this._showHideSidebarButton.addEventListener('click', buttonClicked.bind(this));
this._updateShowHideSidebarButton();
@@ -857,7 +857,7 @@ WebInspector.SplitWidget = class extends WebInspector.Widget {
var sidebarHidden = this._showMode === WebInspector.SplitWidget.ShowMode.OnlyMain;
var side =
this.isVertical() ? (this.isSidebarSecond() ? 'right' : 'left') : (this.isSidebarSecond() ? 'bottom' : 'top');
- this._showHideSidebarButton.setState(side + '-' + (sidebarHidden ? 'show' : 'hide'));
+ this._showHideSidebarButton.setGlyph((sidebarHidden ? 'show-' : 'hide-') + side + '-sidebar-item');
this._showHideSidebarButton.setTitle(
sidebarHidden ? WebInspector.UIString('Show %s', this._showHideSidebarButtonTitle) :
WebInspector.UIString('Hide %s', this._showHideSidebarButtonTitle));

Powered by Google App Engine
This is Rietveld 408576698