diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index 316fc025..57e174e3 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -16,7 +16,8 @@ tab[treestyletab-drop-position] .treestyletab-drop-marker { } tab[treestyletab-collapsed="true"], -.tabbrowser-strip[collapsed="true"]+splitter { +.tabbrowser-strip[collapsed="true"]+splitter, +#appcontent[ahFull="true"] .tabbrowser-strip[ahHIDE="true"]+splitter /* AutoHide */ { visibility: collapse; } @@ -29,6 +30,12 @@ tabbrowser[treestyletab-vertical="true"] .tab-drop-indicator-bar display: none !important; } +/* to modify browser's margin-left/margin-right dynamically */ +#appcontent { + position: relative; + margin: 0; +} + tabbrowser[treestyletab-vertical="true"] > tabbox { -moz-box-orient: horizontal !important; } diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 06b69d3a..3a3ddf54 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -823,6 +823,105 @@ catch(e) { } if ('autoHIDE' in window) { + eval('autoHIDE.ShowMenu = '+ + autoHIDE.ShowMenu.toSource().replace( + '{', + '{ var treeStyleTabPos = TreeStyleTabService.getPref("extensions.treestyletab.tabbar.position");' + ).replace( + 'e.screenY <= autoHIDE.Win.boxObject.screenY + autoHIDE.space', + <>= autoHIDE.Win.boxObject.screenX + autoHIDE.Win.boxObject.width - autoHIDE.space) : + treeStyleTabPos == 'bottom' ? + (e.screenY >= autoHIDE.Win.boxObject.screenY + autoHIDE.Win.boxObject.height - autoHIDE.space) : + false + ))]]> + ).replace( + 'e.screenY > getBrowser().mCurrentBrowser.boxObject.screenY + 25', + <> getBrowser().mCurrentBrowser.boxObject.screenY + 25 && + ( + treeStyleTabPos == 'left' ? + (e.screenX > getBrowser().mCurrentBrowser.boxObject.screenX + 25) : + treeStyleTabPos == 'right' ? + (e.screenX < getBrowser().mCurrentBrowser.boxObject.screenX + getBrowser().mCurrentBrowser.boxObject.width - 25) : + treeStyleTabPos == 'bottom' ? + (e.screenY < getBrowser().mCurrentBrowser.boxObject.screenY + getBrowser().mCurrentBrowser.boxObject.height - 25) : + true + ))]]> + ) + ); + eval('autoHIDE.HideToolbar = '+ + autoHIDE.HideToolbar.toSource().replace( + 'if (this.Show) {', + <> + ) + ); + eval('autoHIDE.EndFull = '+ + autoHIDE.EndFull.toSource().replace( + '{', + <> + ) + ); + eval('autoHIDE.SetMenu = '+ + autoHIDE.SetMenu.toSource().replace( + '{', + <> + ) + ); + eval('autoHIDE.MoveC = '+ + autoHIDE.MoveC.toSource().replace( + '{', + <> + ).replace( + '.move(0, - this.delta)', + '.move((treeStyleTabPos == "left" ? -this.__treestyletab__tabBarWidth : 0 ), -this.delta)' + ) + ); } },