Firefox 3のフルスクリーン表示機能との連携を強化
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2657 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
7f64adf069
commit
ee28dd7ae0
@ -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()
|
||||
|
@ -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');
|
||||
@ -2805,6 +2804,16 @@ TreeStyleTabBrowser.prototype = {
|
||||
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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user