Firefox 3のフルスクリーン表示機能との連携を強化

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2657 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2008-06-17 11:57:29 +00:00
parent 7f64adf069
commit ee28dd7ae0
3 changed files with 46 additions and 5 deletions

View File

@ -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(
'{',
<![CDATA[{
var treeStyleTab = gBrowser.treeStyleTab;
if (gBrowser.getAttribute(treeStyleTab.kTABBAR_POSITION) != 'top') {
treeStyleTab.autoHideMode = treeStyleTab.getTreePref(window.fullScreen ? 'tabbar.autoHide.mode' : 'tabbar.autoHide.mode.fullscreen' );
treeStyleTab.endAutoHide();
if (treeStyleTab.autoHideMode != treeStyleTab.kAUTOHIDE_MODE_DISABLED)
treeStyleTab.startAutoHide();
}
]]>
)
);
}
}, },
destroy : function() destroy : function()

View File

@ -877,8 +877,7 @@ TreeStyleTabBrowser.prototype = {
case 'extensions.treestyletab.tabbar.autoHide.mode': case 'extensions.treestyletab.tabbar.autoHide.mode':
this.endAutoHide(); this.endAutoHide();
var pos = b.getAttribute(this.kTABBAR_POSITION); if (value != this.kAUTOHIDE_MODE_DISABLED)
if (value != this.kAUTOHIDE_MODE_DISABLED/* && (pos == 'left' || pos == 'right')*/)
this.startAutoHide(); this.startAutoHide();
break; break;
@ -1652,7 +1651,7 @@ TreeStyleTabBrowser.prototype = {
if (this.getTreePref('show.'+this.kMENUITEM_AUTOHIDE)/* && if (this.getTreePref('show.'+this.kMENUITEM_AUTOHIDE)/* &&
(pos == 'left' || pos == 'right')*/) { (pos == 'left' || pos == 'right')*/) {
autohide.removeAttribute('hidden'); autohide.removeAttribute('hidden');
if (this.getTreePref('tabbar.autoHide.mode') != this.kAUTOHIDE_MODE_DISABLED) if (this.autoHideMode != this.kAUTOHIDE_MODE_DISABLED)
autohide.setAttribute('checked', true); autohide.setAttribute('checked', true);
else else
autohide.removeAttribute('checked'); autohide.removeAttribute('checked');
@ -2805,6 +2804,16 @@ TreeStyleTabBrowser.prototype = {
return this.tabbarHeight; return this.tabbarHeight;
}, },
get autoHideMode()
{
return TreeStyleTabService.autoHideMode;
},
set autoHideMode(aValue)
{
TreeStyleTabService.autoHideMode = aValue;
return aValue;
},
showHideTabbarInternal : function(aReason) showHideTabbarInternal : function(aReason)
{ {
fullScreenCanvas.show(); fullScreenCanvas.show();
@ -3032,7 +3041,7 @@ TreeStyleTabBrowser.prototype = {
) )
]; ];
if (pos != 'top' && 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]) style != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE])
this.mTabBrowser.setAttribute(this.kTRANSPARENT, style); this.mTabBrowser.setAttribute(this.kTRANSPARENT, style);
else else

View File

@ -11,6 +11,7 @@ pref("extensions.treestyletab.tabbar.style", "mixed");
// 0 = disabled, 1 = hide, 2 = shrink // 0 = disabled, 1 = hide, 2 = shrink
pref("extensions.treestyletab.tabbar.autoHide.mode", 0); pref("extensions.treestyletab.tabbar.autoHide.mode", 0);
pref("extensions.treestyletab.tabbar.autoHide.mode.toggle", 2); 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.delay", 50);
pref("extensions.treestyletab.tabbar.autoHide.area", 7); pref("extensions.treestyletab.tabbar.autoHide.area", 7);
pref("extensions.treestyletab.tabbar.autoHide.expandArea", false); pref("extensions.treestyletab.tabbar.autoHide.expandArea", false);