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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js

Issue 1574213006: DevTools: beautified styles sidebar toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 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
Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
index 0d7cd47f41e340f40b4a8b5d036798361a978d82..4da821ed65ca661c9b5fd9adcf210957643d01a8 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
@@ -315,7 +315,7 @@ WebInspector.DeviceModeView.Toolbar = function(model, showMediaInspectorSetting,
this._lastMode = new Map();
/** @type {?WebInspector.EmulatedDevice} */
this._lastDevice = null;
- /** @type {!Array<!WebInspector.ToolbarLabel>} */
+ /** @type {!Array<!WebInspector.ToolbarButton>} */
this._appliedSizeItems = [];
/** @type {!Array<!WebInspector.ToolbarMenuButton>} */
this._scaleItems = [];
@@ -346,11 +346,11 @@ WebInspector.DeviceModeView.Toolbar = function(model, showMediaInspectorSetting,
rightContainer.createChild("div", "device-mode-toolbar-spacer");
var rightToolbar = new WebInspector.Toolbar("", rightContainer);
rightToolbar.makeWrappable(true);
- this._uaItem = new WebInspector.ToolbarLabel();
+ this._uaItem = new WebInspector.ToolbarText();
this._uaItem.setVisible(false);
this._uaItem.setTitle(WebInspector.UIString("User agent type"));
rightToolbar.appendToolbarItem(this._uaItem);
- this._deviceScaleItem = new WebInspector.ToolbarLabel();
+ this._deviceScaleItem = new WebInspector.ToolbarText();
this._deviceScaleItem.setVisible(false);
this._deviceScaleItem.setTitle(WebInspector.UIString("Device pixel ratio"));
rightToolbar.appendToolbarItem(this._deviceScaleItem);
@@ -455,7 +455,7 @@ WebInspector.DeviceModeView.Toolbar.prototype = {
*/
_appendAppliedSizeItems: function(toolbar)
{
- var item = new WebInspector.ToolbarLabel();
+ var item = new WebInspector.ToolbarText("");
this._appliedSizeItems.push(item);
toolbar.appendToolbarItem(item);
},
@@ -468,8 +468,6 @@ WebInspector.DeviceModeView.Toolbar.prototype = {
var scaleItem = new WebInspector.ToolbarMenuButton(this._appendScaleMenuItems.bind(this));
scaleItem.setTitle(WebInspector.UIString("Zoom"));
scaleItem.setGlyph("");
- scaleItem.setBold(false);
- scaleItem.setDimmed(true);
scaleItem.addDropDownArrow();
toolbar.appendToolbarItem(scaleItem);
this._scaleItems.push(scaleItem);
@@ -814,11 +812,8 @@ WebInspector.DeviceModeView.Toolbar.prototype = {
}
var offscreen = this._model.screenRect().width > this._model.visiblePageRect().width || this._model.screenRect().height > this._model.visiblePageRect().height;
dgozman 2016/01/14 22:05:21 Remove the whole offscreen code then.
- if (offscreen !== this._cachedOffscreen) {
- for (var item of this._scaleItems)
- item.setDimmed(!offscreen);
+ if (offscreen !== this._cachedOffscreen)
this._cachedOffscreen = offscreen;
- }
var deviceScale = this._model.deviceScaleFactorSetting().get();
if (deviceScale !== this._cachedDeviceScale) {

Powered by Google App Engine
This is Rietveld 408576698