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

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

Issue 197823010: [DevTools] Add minimum size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@splitdip2
Patch Set: width/height -> right/bottom 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/TabbedPane.js
diff --git a/Source/devtools/front_end/TabbedPane.js b/Source/devtools/front_end/TabbedPane.js
index d7e2236660931095ae54f69b1a2bef226b6cd3ba..940af89059b3d4fc7c1bfdbedd8b8b4a9f1a27e6 100644
--- a/Source/devtools/front_end/TabbedPane.js
+++ b/Source/devtools/front_end/TabbedPane.js
@@ -83,6 +83,7 @@ WebInspector.TabbedPane.prototype = {
set verticalTabLayout(verticalTabLayout)
{
this._verticalTabLayout = verticalTabLayout;
+ this.invalidateMinimumSize();
},
/**
@@ -286,7 +287,7 @@ WebInspector.TabbedPane.prototype = {
this._hideCurrentTab();
this._showTab(tab);
this._currentTab = tab;
-
+
this._tabsHistory.splice(this._tabsHistory.indexOf(tab), 1);
this._tabsHistory.splice(0, 0, tab);
@@ -375,6 +376,20 @@ WebInspector.TabbedPane.prototype = {
var effectiveTab = this._currentTab || this._tabsHistory[0];
if (effectiveTab)
this.selectTab(effectiveTab.id);
+ this.invalidateMinimumSize();
+ },
+
+ /**
+ * @return {!Size}
+ */
+ calculateMinimumSize: function()
+ {
+ var size = WebInspector.VBox.prototype.calculateMinimumSize.call(this);
+ if (this._verticalTabLayout)
+ size.width += this._headerElement.offsetWidth;
+ else
+ size.height += this._headerElement.offsetHeight;
+ return size;
},
_updateTabElements: function()

Powered by Google App Engine
This is Rietveld 408576698