Disallow to enlarge the width of the tab bar over a half of the window
This commit is contained in:
parent
b79da46804
commit
551ce8d809
@ -1009,9 +1009,15 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
ReferenceCounter.add('currentTarget,mousemove,TSTWindow,false');
|
ReferenceCounter.add('currentTarget,mousemove,TSTWindow,false');
|
||||||
|
|
||||||
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
var b = this.getTabBrowserFromChild(aEvent.currentTarget);
|
||||||
var box = aEvent.currentTarget.id == 'treestyletab-tabbar-resizer-splitter' ?
|
var box;
|
||||||
this.getTabStrip(b) :
|
if (aEvent.currentTarget.id == 'treestyletab-tabbar-resizer-splitter') {
|
||||||
b.treeStyleTab.tabStripPlaceHolder || b.tabContainer ;
|
box = this.getTabStrip(b);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
box = b.treeStyleTab.tabStripPlaceHolder || b.tabContainer;
|
||||||
|
}
|
||||||
|
b.treeStyleTab.tabStripPlaceHolder.setAttribute('maxwidth', b.boxObject.width * this.MAX_TABBAR_SIZE_RATIO);
|
||||||
|
|
||||||
this.tabbarResizeStartWidth = box.boxObject.width;
|
this.tabbarResizeStartWidth = box.boxObject.width;
|
||||||
this.tabbarResizeStartHeight = box.boxObject.height;
|
this.tabbarResizeStartHeight = box.boxObject.height;
|
||||||
this.tabbarResizeStartX = aEvent.screenX;
|
this.tabbarResizeStartX = aEvent.screenX;
|
||||||
@ -1044,6 +1050,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
catch(e) {
|
catch(e) {
|
||||||
this.defaultErrorHandler(e);
|
this.defaultErrorHandler(e);
|
||||||
}
|
}
|
||||||
|
b.treeStyleTab.tabStripPlaceHolder.removeAttribute('maxwidth');
|
||||||
}).bind(this), 0);
|
}).bind(this), 0);
|
||||||
},
|
},
|
||||||
onTabbarResizing : function TSTWindow_onTabbarResizing(aEvent)
|
onTabbarResizing : function TSTWindow_onTabbarResizing(aEvent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user