Update floating tab bar if the sidebar width is changed

This commit is contained in:
YUKI Hiroshi 2015-11-05 18:14:17 +09:00
parent 1f4458cb3a
commit 8fb3ce884e

View File

@ -337,9 +337,11 @@ var TreeStyleTabWindowHelper = {
SidebarUI.__treestyletab__show = SidebarUI.show;
SidebarUI.show = function(...aArgs) {
var opened = this.isOpen;
var width = this.browser.boxObject.width;
return this.__treestyletab__show.apply(this, aArgs)
.then((function(aResult) {
if (opened !== this.isOpen)
if (opened !== this.isOpen ||
width !== this.browser.boxObject.width)
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
return aResult;
}).bind(this));
@ -347,8 +349,10 @@ var TreeStyleTabWindowHelper = {
SidebarUI.__treestyletab__hide = SidebarUI.hide;
SidebarUI.hide = function(...aArgs) {
var opened = this.isOpen;
var width = this.browser.boxObject.width;
var retVal = this.__treestyletab__hide.apply(this, aArgs);
if (opened !== this.isOpen)
if (opened !== this.isOpen ||
width !== this.browser.boxObject.width)
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
return retVal;
};