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

Unified Diff: Source/devtools/front_end/SourcesPanel.js

Issue 197823010: [DevTools] Add minimum size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@splitdip2
Patch Set: Created 6 years, 9 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: Source/devtools/front_end/SourcesPanel.js
diff --git a/Source/devtools/front_end/SourcesPanel.js b/Source/devtools/front_end/SourcesPanel.js
index 6b7edb26e8d4a2b3ce179266a70276942b8de3b7..f98382910d4a9487590242c043840455f1950832 100644
--- a/Source/devtools/front_end/SourcesPanel.js
+++ b/Source/devtools/front_end/SourcesPanel.js
@@ -84,9 +84,6 @@ WebInspector.SourcesPanel = function(workspaceForTest)
const initialDebugSidebarWidth = 225;
this._splitView = new WebInspector.SplitView(true, true, "sourcesPanelSplitViewState", initialDebugSidebarWidth);
this._splitView.enableShowModeSaving();
- this._splitView.setMainElementConstraints(200, 25);
- this._splitView.setSidebarElementConstraints(WebInspector.SourcesPanel.minToolbarWidth, 25);
-
this._splitView.show(this.element);
// Create scripts navigator
@@ -95,12 +92,10 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this.editorView.enableShowModeSaving();
this.editorView.element.id = "scripts-editor-split-view";
this.editorView.element.tabIndex = 0;
-
- this.editorView.setSidebarElementConstraints(Preferences.minSidebarWidth);
- this.editorView.setMainElementConstraints(50, 50);
this.editorView.show(this._splitView.mainElement());
this._navigator = new WebInspector.SourcesNavigator();
+ this._navigator.view.setMinimumSize(Preferences.minSidebarWidth);
pfeldman 2014/03/14 06:23:10 Why did this compile?
dgozman 2014/03/14 15:55:15 No idea.
this._navigator.view.show(this.editorView.sidebarElement());
var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIString("Hit Cmd+O to open a file") : WebInspector.UIString("Hit Ctrl+O to open a file");
@@ -238,7 +233,7 @@ WebInspector.SourcesPanel = function(workspaceForTest)
window.addEventListener("beforeunload", handleBeforeUnload.bind(this), true);
}
-WebInspector.SourcesPanel.minToolbarWidth = 215;
+WebInspector.SourcesPanel.minToolbarWidth = 185;
WebInspector.SourcesPanel.Events = {
EditorClosed: "EditorClosed",
@@ -1590,6 +1585,7 @@ WebInspector.SourcesPanel.prototype = {
vbox.element.appendChild(this._debugToolbarDrawer);
vbox.element.appendChild(this.debugToolbar);
vbox.element.appendChild(this.threadsToolbar.element);
+ vbox.setMinimumSize(new Size(WebInspector.SourcesPanel.minToolbarWidth, 25));
var sidebarPaneStack = new WebInspector.SidebarPaneStack();
sidebarPaneStack.element.classList.add("flex-auto");
sidebarPaneStack.show(vbox.element);
@@ -1603,7 +1599,6 @@ WebInspector.SourcesPanel.prototype = {
this.sidebarPaneView = vbox;
} else {
var splitView = new WebInspector.SplitView(true, true, "sourcesPanelDebuggerSidebarSplitViewState", 0.5);
- splitView.setMainElementConstraints(WebInspector.SourcesPanel.minToolbarWidth, 25);
vbox.show(splitView.mainElement());
// Populate the left stack.
@@ -1686,6 +1681,7 @@ WebInspector.SourcesPanel.prototype = {
WebInspector.SourcesView = function()
{
WebInspector.VBox.call(this);
+ this.setMinimumSize(new Size(50, 50));
this.registerRequiredCSS("sourcesView.css");
this.element.id = "sources-panel-sources-view";
this.element.addEventListener("dragenter", this._onDragEnter.bind(this), true);

Powered by Google App Engine
This is Rietveld 408576698