diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 4127c912..7227e287 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1213,6 +1213,37 @@ catch(e) { $&]]> ) ); + + + // Firefox 3 full screen + if ('FullScreen' in window && '_animateUp' in FullScreen) { + eval('FullScreen._animateUp = '+ + FullScreen._animateUp.toSource().replace( + 'gBrowser.mStrip.boxObject.height', + '((gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION) != "top") ? 0 : gBrowser.mStrip.boxObject.height)' + ) + ); + eval('FullScreen.mouseoverToggle = '+ + FullScreen.mouseoverToggle.toSource().replace( + 'gBrowser.mStrip.setAttribute("moz-collapsed", !aShow);', + 'if (gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION) == "top") { $& }' + ) + ); + eval('FullScreen.toggle = '+ + FullScreen.toggle.toSource().replace( + '{', + + ) + ); + } }, destroy : function() diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 51fd3aa7..1e291fa1 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -877,8 +877,7 @@ TreeStyleTabBrowser.prototype = { case 'extensions.treestyletab.tabbar.autoHide.mode': this.endAutoHide(); - var pos = b.getAttribute(this.kTABBAR_POSITION); - if (value != this.kAUTOHIDE_MODE_DISABLED/* && (pos == 'left' || pos == 'right')*/) + if (value != this.kAUTOHIDE_MODE_DISABLED) this.startAutoHide(); break; @@ -1652,7 +1651,7 @@ TreeStyleTabBrowser.prototype = { if (this.getTreePref('show.'+this.kMENUITEM_AUTOHIDE)/* && (pos == 'left' || pos == 'right')*/) { autohide.removeAttribute('hidden'); - if (this.getTreePref('tabbar.autoHide.mode') != this.kAUTOHIDE_MODE_DISABLED) + if (this.autoHideMode != this.kAUTOHIDE_MODE_DISABLED) autohide.setAttribute('checked', true); else autohide.removeAttribute('checked'); @@ -2800,11 +2799,21 @@ TreeStyleTabBrowser.prototype = { break; } }, - get autoHideYOffset() + get autoHideYOffset() { return this.tabbarHeight; }, + get autoHideMode() + { + return TreeStyleTabService.autoHideMode; + }, + set autoHideMode(aValue) + { + TreeStyleTabService.autoHideMode = aValue; + return aValue; + }, + showHideTabbarInternal : function(aReason) { fullScreenCanvas.show(); @@ -3032,7 +3041,7 @@ TreeStyleTabBrowser.prototype = { ) ]; if (pos != 'top' && - this.getTreePref('tabbar.autoHide.mode') != this.kAUTOHIDE_MODE_DISABLED && + this.autoHideMode != this.kAUTOHIDE_MODE_DISABLED && style != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE]) this.mTabBrowser.setAttribute(this.kTRANSPARENT, style); else diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 74871b73..4fdd6e1e 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -11,6 +11,7 @@ pref("extensions.treestyletab.tabbar.style", "mixed"); // 0 = disabled, 1 = hide, 2 = shrink pref("extensions.treestyletab.tabbar.autoHide.mode", 0); pref("extensions.treestyletab.tabbar.autoHide.mode.toggle", 2); +pref("extensions.treestyletab.tabbar.autoHide.mode.fullscreen", 1); pref("extensions.treestyletab.tabbar.autoHide.delay", 50); pref("extensions.treestyletab.tabbar.autoHide.area", 7); pref("extensions.treestyletab.tabbar.autoHide.expandArea", false);