From 8fb3ce884e878099f1971817f75cfb041589c05c Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Thu, 5 Nov 2015 18:14:17 +0900 Subject: [PATCH] Update floating tab bar if the sidebar width is changed --- content/treestyletab/windowHelper.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index c6e96083..58cc0467 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -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; };