タブバーが上にある時は透過しないようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2047 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
25d5d852e3
commit
40690c46c2
@ -805,6 +805,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
self.initTabContents(aTab);
|
self.initTabContents(aTab);
|
||||||
});
|
});
|
||||||
if (this.autoHideEnabled) this.showTabbar();
|
if (this.autoHideEnabled) this.showTabbar();
|
||||||
|
this.updateTabbarTransparency();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.invertUI':
|
case 'extensions.treestyletab.tabbar.invertUI':
|
||||||
@ -845,7 +846,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.invertScrollbar':
|
case 'extensions.treestyletab.tabbar.invertScrollbar':
|
||||||
if (value &&
|
if (value &&
|
||||||
this.mTabBrowser.getAttribute(this.kTABBAR_POSITION) == 'left' &&
|
b.getAttribute(this.kTABBAR_POSITION) == 'left' &&
|
||||||
this.isGecko18)
|
this.isGecko18)
|
||||||
b.setAttribute(this.kSCROLLBAR_INVERTED, true);
|
b.setAttribute(this.kSCROLLBAR_INVERTED, true);
|
||||||
else
|
else
|
||||||
@ -853,7 +854,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.hideAlltabsButton':
|
case 'extensions.treestyletab.tabbar.hideAlltabsButton':
|
||||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
var pos = b.getAttribute(this.kTABBAR_POSITION);
|
||||||
if (value && (pos == 'left' || pos == 'right'))
|
if (value && (pos == 'left' || pos == 'right'))
|
||||||
b.setAttribute(this.kHIDE_ALLTABS, true);
|
b.setAttribute(this.kHIDE_ALLTABS, true);
|
||||||
else
|
else
|
||||||
@ -868,17 +869,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.autoHide.enabled':
|
case 'extensions.treestyletab.tabbar.autoHide.enabled':
|
||||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
var pos = b.getAttribute(this.kTABBAR_POSITION);
|
||||||
if (value/* && (pos == 'left' || pos == 'right')*/)
|
if (value/* && (pos == 'left' || pos == 'right')*/)
|
||||||
this.startAutoHide();
|
this.startAutoHide();
|
||||||
else
|
else
|
||||||
this.endAutoHide();
|
this.endAutoHide();
|
||||||
case 'extensions.treestyletab.tabbar.transparent':
|
|
||||||
if (this.getPref('extensions.treestyletab.tabbar.autoHide.enabled') &&
|
|
||||||
this.getPref('extensions.treestyletab.tabbar.transparent'))
|
|
||||||
b.setAttribute(this.kTRANSPARENT, true);
|
|
||||||
else
|
|
||||||
b.removeAttribute(this.kTRANSPARENT);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.autoShow.mousemove':
|
case 'extensions.treestyletab.tabbar.autoShow.mousemove':
|
||||||
@ -895,6 +890,10 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
b.removeAttribute(this.kFIXED);
|
b.removeAttribute(this.kFIXED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'extensions.treestyletab.tabbar.transparent':
|
||||||
|
this.updateTabbarTransparency();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2774,7 +2773,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
0
|
0
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (this.getTreePref('tabbar.transparent'))
|
if (this.mTabBrowser.getAttribute(this.kTRANSPARENT) == 'true')
|
||||||
this.drawTabbarCanvas();
|
this.drawTabbarCanvas();
|
||||||
else
|
else
|
||||||
this.clearTabbarCanvas();
|
this.clearTabbarCanvas();
|
||||||
@ -2832,6 +2831,17 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.tabbarCanvas.height = 0;
|
this.tabbarCanvas.height = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateTabbarTransparency : function()
|
||||||
|
{
|
||||||
|
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
||||||
|
if (pos != 'top' &&
|
||||||
|
this.getTreePref('tabbar.autoHide.enabled') &&
|
||||||
|
this.getTreePref('tabbar.transparent'))
|
||||||
|
this.mTabBrowser.setAttribute(this.kTRANSPARENT, true);
|
||||||
|
else
|
||||||
|
this.mTabBrowser.removeAttribute(this.kTRANSPARENT);
|
||||||
|
},
|
||||||
|
|
||||||
/* auto hide */
|
/* auto hide */
|
||||||
autoHideEnabled : false,
|
autoHideEnabled : false,
|
||||||
|
|
||||||
@ -2854,6 +2864,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.startListenMouseMove();
|
this.startListenMouseMove();
|
||||||
|
|
||||||
this.clearTabbarCanvas();
|
this.clearTabbarCanvas();
|
||||||
|
this.updateTabbarTransparency();
|
||||||
|
|
||||||
this.tabbarShown = true;
|
this.tabbarShown = true;
|
||||||
this.showHideTabbarInternal();
|
this.showHideTabbarInternal();
|
||||||
@ -2872,6 +2883,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.endListenMouseMove();
|
this.endListenMouseMove();
|
||||||
|
|
||||||
this.clearTabbarCanvas();
|
this.clearTabbarCanvas();
|
||||||
|
this.updateTabbarTransparency();
|
||||||
|
|
||||||
this.container.style.margin = 0;
|
this.container.style.margin = 0;
|
||||||
this.mTabBrowser.removeAttribute(this.kAUTOHIDE);
|
this.mTabBrowser.removeAttribute(this.kAUTOHIDE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user