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

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: fixed comments 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
« no previous file with comments | « Source/devtools/front_end/SplitView.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TabbedPane.js
diff --git a/Source/devtools/front_end/TabbedPane.js b/Source/devtools/front_end/TabbedPane.js
index 37e7e2dd4814cfcffd3df3be766729ca8c5a9a81..3a93bafe529048e3a3e2339f608ae8336149291b 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()
« no previous file with comments | « Source/devtools/front_end/SplitView.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698