Set expanded width of the tab bar correctly

This commit is contained in:
Piro / YUKI Hiroshi 2015-03-04 01:34:24 +09:00
parent 2d8649735e
commit a6fe5e8fdb
2 changed files with 7 additions and 4 deletions

View File

@ -1432,7 +1432,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
this.setTabbrowserAttribute(this.kMODE, 'vertical'); this.setTabbrowserAttribute(this.kMODE, 'vertical');
let width = this.maxTabbarWidth(this.tabbarWidth, b); //let width = this.maxTabbarWidth(this.tabbarWidth, b);
let width = this.maxTabbarWidth(this.autoHide.expandedWidth, b);
this.setTabStripAttribute('width', width); this.setTabStripAttribute('width', width);
this.removeTabStripAttribute('height'); this.removeTabStripAttribute('height');
b.mPanelContainer.removeAttribute('height'); b.mPanelContainer.removeAttribute('height');
@ -1989,7 +1990,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let realSize = this.getTabbarPlaceholderSize(); let realSize = this.getTabbarPlaceholderSize();
let width = (this.autoHide.expanded && this.isVertical && (aReason & this.kTABBAR_UPDATE_SYNC_TO_TABBAR) ? let width = (this.autoHide.expanded && this.isVertical && (aReason & this.kTABBAR_UPDATE_SYNC_TO_TABBAR) ?
this.maxTabbarWidth(this.tabbarWidth) : // this.maxTabbarWidth(this.tabbarWidth) :
this.maxTabbarWidth(this.autoHide.expandedWidth) :
0 0
) || realSize.width; ) || realSize.width;
let height = (this.autoHide.expanded && !this.isVertical && (aReason & this.kTABBAR_UPDATE_SYNC_TO_TABBAR) ? let height = (this.autoHide.expanded && !this.isVertical && (aReason & this.kTABBAR_UPDATE_SYNC_TO_TABBAR) ?
@ -5157,7 +5159,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
resetTabbarSize : function TSTBrowser_resetTabbarSize() resetTabbarSize : function TSTBrowser_resetTabbarSize()
{ {
if (this.isVertical) { if (this.isVertical) {
this.tabbarWidth = utils.getTreePref('tabbar.width.default'); //this.tabbarWidth = utils.getTreePref('tabbar.width.default');
this.autoHide.resetWidth(); this.autoHide.resetWidth();
} }
else { else {

View File

@ -973,7 +973,8 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
width += (pos == 'left' ? delta : -delta ); width += (pos == 'left' ? delta : -delta );
width = this.maxTabbarWidth(width, b); width = this.maxTabbarWidth(width, b);
if (expanded || b.treeStyleTab.autoHide.expanded) { if (expanded || b.treeStyleTab.autoHide.expanded) {
b.treeStyleTab.tabbarWidth = width; // b.treeStyleTab.tabbarWidth = width;
b.treeStyleTab.autoHide.expandedWidth = width;
if (b.treeStyleTab.autoHide.mode == b.treeStyleTab.autoHide.kMODE_SHRINK && if (b.treeStyleTab.autoHide.mode == b.treeStyleTab.autoHide.kMODE_SHRINK &&
b.treeStyleTab.tabStripPlaceHolder) b.treeStyleTab.tabStripPlaceHolder)
b.treeStyleTab.tabStripPlaceHolder.setAttribute('width', b.treeStyleTab.autoHide.shrunkenWidth); b.treeStyleTab.tabStripPlaceHolder.setAttribute('width', b.treeStyleTab.autoHide.shrunkenWidth);