Update floating tab bar if the sidebar width is changed
This commit is contained in:
parent
1f4458cb3a
commit
8fb3ce884e
@ -337,9 +337,11 @@ var TreeStyleTabWindowHelper = {
|
|||||||
SidebarUI.__treestyletab__show = SidebarUI.show;
|
SidebarUI.__treestyletab__show = SidebarUI.show;
|
||||||
SidebarUI.show = function(...aArgs) {
|
SidebarUI.show = function(...aArgs) {
|
||||||
var opened = this.isOpen;
|
var opened = this.isOpen;
|
||||||
|
var width = this.browser.boxObject.width;
|
||||||
return this.__treestyletab__show.apply(this, aArgs)
|
return this.__treestyletab__show.apply(this, aArgs)
|
||||||
.then((function(aResult) {
|
.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);
|
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
|
||||||
return aResult;
|
return aResult;
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
@ -347,8 +349,10 @@ var TreeStyleTabWindowHelper = {
|
|||||||
SidebarUI.__treestyletab__hide = SidebarUI.hide;
|
SidebarUI.__treestyletab__hide = SidebarUI.hide;
|
||||||
SidebarUI.hide = function(...aArgs) {
|
SidebarUI.hide = function(...aArgs) {
|
||||||
var opened = this.isOpen;
|
var opened = this.isOpen;
|
||||||
|
var width = this.browser.boxObject.width;
|
||||||
var retVal = this.__treestyletab__hide.apply(this, aArgs);
|
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);
|
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
|
||||||
return retVal;
|
return retVal;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user