Commit c50a25e1 authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Restore toolbar button order regressed in r175358

The Dock button should be the rightmost one, otherwise it gets overlapped
by a button to its right (Settings).

R=eustas, pfeldman@chromium.org, vsevik
BUG=383313

Review URL: https://codereview.chromium.org/329113002

git-svn-id: svn://svn.chromium.org/blink/trunk@175978 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3415877d
...@@ -66,6 +66,16 @@ WebInspector.Main.prototype = { ...@@ -66,6 +66,16 @@ WebInspector.Main.prototype = {
_createGlobalStatusBarItems: function() _createGlobalStatusBarItems: function()
{ {
var extensions = WebInspector.moduleManager.extensions(WebInspector.StatusBarButton.Provider); var extensions = WebInspector.moduleManager.extensions(WebInspector.StatusBarButton.Provider);
/**
* @param {!WebInspector.ModuleManager.Extension} left
* @param {!WebInspector.ModuleManager.Extension} right
*/
function orderComparator(left, right)
{
return left.descriptor()["order"] - right.descriptor()["order"];
}
extensions.sort(orderComparator);
extensions.forEach(function(extension) { extensions.forEach(function(extension) {
var button; var button;
switch (extension.descriptor()["location"]) { switch (extension.descriptor()["location"]) {
......
...@@ -119,21 +119,25 @@ ...@@ -119,21 +119,25 @@
"type": "@WebInspector.StatusBarButton.Provider", "type": "@WebInspector.StatusBarButton.Provider",
"className": "WebInspector.InspectElementModeController.ToggleButtonProvider", "className": "WebInspector.InspectElementModeController.ToggleButtonProvider",
"location": "toolbar-left", "location": "toolbar-left",
"order": 0,
"actionId": "main.toggle-element-search" "actionId": "main.toggle-element-search"
}, },
{ {
"type": "@WebInspector.StatusBarButton.Provider", "type": "@WebInspector.StatusBarButton.Provider",
"className": "WebInspector.AdvancedApp.ResponsiveDesignButtonProvider", "className": "WebInspector.AdvancedApp.ResponsiveDesignButtonProvider",
"order": 1,
"location": "toolbar-left" "location": "toolbar-left"
}, },
{ {
"type": "@WebInspector.StatusBarButton.Provider", "type": "@WebInspector.StatusBarButton.Provider",
"className": "WebInspector.DockController.ButtonProvider", "className": "WebInspector.DockController.ButtonProvider",
"order": 1,
"location": "toolbar-right" "location": "toolbar-right"
}, },
{ {
"type": "@WebInspector.StatusBarButton.Provider", "type": "@WebInspector.StatusBarButton.Provider",
"className": "WebInspector.ScreencastApp.StatusBarButtonProvider", "className": "WebInspector.ScreencastApp.StatusBarButtonProvider",
"order": 2,
"location": "toolbar-right" "location": "toolbar-right"
}, },
{ {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"actionId": "settings.show", "actionId": "settings.show",
"location": "toolbar-right", "location": "toolbar-right",
"title": "Settings", "title": "Settings",
"order": 0,
"elementClass": "settings-status-bar-item" "elementClass": "settings-status-bar-item"
} }
], ],
......
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