タブバーが透過されていなかった

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6437 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-03-24 19:23:21 +00:00
parent a101b37363
commit e46325bed8
4 changed files with 32 additions and 12 deletions

View File

@ -149,6 +149,9 @@ TreeStyleTabBrowserAutoHide.prototype = {
this.updateTransparency(); this.updateTransparency();
sv.container.style.margin = 0; sv.container.style.margin = 0;
sv.setTabbarAttribute(this.kAUTOHIDE, null, sv.mTabBrowser);
sv.setTabbarAttribute(this.kSTATE, null, sv.mTabBrowser);
sv.setTabbarAttribute(this.kTRANSPARENT, null, sv.mTabBrowser);
sv.mTabBrowser.removeAttribute(this.kAUTOHIDE); sv.mTabBrowser.removeAttribute(this.kAUTOHIDE);
sv.mTabBrowser.removeAttribute(this.kSTATE); sv.mTabBrowser.removeAttribute(this.kSTATE);
sv.mTabBrowser.removeAttribute(this.kTRANSPARENT); sv.mTabBrowser.removeAttribute(this.kTRANSPARENT);
@ -166,7 +169,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
if (this.mode != this.kMODE_DISABLED) { if (this.mode != this.kMODE_DISABLED) {
this.start(); this.start();
var sv = this.mOwner; var sv = this.mOwner;
sv.tabStrip.removeAttribute('moz-collapsed'); sv.setTabbarAttribute('moz-collapsed', null, sv.mTabBrowser);
sv.mTabBrowser.mTabContainer.removeAttribute('moz-collapsed'); // ”OÌ½ß sv.mTabBrowser.mTabContainer.removeAttribute('moz-collapsed'); // ”O̽ß
} }
}, },
@ -599,6 +602,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
} }
} }
catch(e) { catch(e) {
dump(e);
} }
}, },
@ -646,7 +650,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
canvasYOffset = tabContainerBox.screenY - sv.mTabBrowser.boxObject.screenY; canvasYOffset = tabContainerBox.screenY - sv.mTabBrowser.boxObject.screenY;
for (let node = this.tabbarCanvas; for (let node = this.tabbarCanvas;
node != sv.tabStrip.parentNode; node != sv.mTabBrowser.mTabBox;
node = node.parentNode) node = node.parentNode)
{ {
let style = window.getComputedStyle(node, null); let style = window.getComputedStyle(node, null);
@ -779,8 +783,8 @@ TreeStyleTabBrowserAutoHide.prototype = {
if (pos != 'top' && if (pos != 'top' &&
this.mode != this.kMODE_DISABLED && this.mode != this.kMODE_DISABLED &&
style != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE]) { style != this.kTRANSPARENT_STYLE[this.kTRANSPARENT_NONE]) {
sv.setTabbarAttribute(this.kTRANSPARENT, this.style, b); sv.setTabbarAttribute(this.kTRANSPARENT, style, b);
b.setAttribute(this.kTRANSPARENT, this.style); b.setAttribute(this.kTRANSPARENT, style);
} }
else { else {
sv.setTabbarAttribute(this.kTRANSPARENT, null, b); sv.setTabbarAttribute(this.kTRANSPARENT, null, b);
@ -1070,7 +1074,7 @@ TreeStyleTabBrowserAutoHide.prototype = {
if ( if (
!(node instanceof Components.interfaces.nsIDOMElement) || !(node instanceof Components.interfaces.nsIDOMElement) ||
( (
(tabbarBox = this.getBoxObjectFor(this.mTabBrowser.mTabContainer)) && (tabbarBox = this.getBoxObjectFor(this.mOwner.mTabBrowser.mTabContainer)) &&
(nodeBox = this.getBoxObjectFor(node)) && (nodeBox = this.getBoxObjectFor(node)) &&
tabbarBox.screenX <= nodeBox.screenX + nodeBox.width && tabbarBox.screenX <= nodeBox.screenX + nodeBox.width &&
tabbarBox.screenX + tabbarBox.width >= nodeBox.screenX && tabbarBox.screenX + tabbarBox.width >= nodeBox.screenX &&
@ -1160,10 +1164,15 @@ TreeStyleTabBrowserAutoHide.prototype = {
b.addEventListener('TreeStyleTabFocusSwitchingEnd', this, false); b.addEventListener('TreeStyleTabFocusSwitchingEnd', this, false);
var stack = document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-stack'); var stack = document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-stack');
if (stack) { if (stack || this.mOwner.placeholder) {
let canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); let canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
canvas.setAttribute('style', 'display:none;width:1;height:1;'); canvas.setAttribute('style', 'display:none;width:1;height:1;');
stack.firstChild.appendChild(canvas);
if (stack)
stack.firstChild.appendChild(canvas);
else
this.mOwner.placeholder.appendChild(canvas);
this.tabbarCanvas = canvas; this.tabbarCanvas = canvas;
this.clearBG(); this.clearBG();
} }

View File

@ -3,9 +3,11 @@
/* tab bar */ /* tab bar */
#TabsToolbar[treestyletab-style="metal"][treestyletab-mode="vertical"]:not([treestyletab-tabbar-position="top"]) { #TabsToolbar[treestyletab-style="metal"][treestyletab-mode="vertical"]:not([treestyletab-tabbar-position="top"]) {
background: transparent !important;
border: 0 none !important; border: 0 none !important;
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
-moz-appearance: none !important;
-moz-box-shadow: none !important; -moz-box-shadow: none !important;
} }
@ -35,7 +37,7 @@
.tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"] .tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"]
.tabs-stack, .tabs-stack,
#TabsToolbar .tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"] { tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"] .tabbrowser-strip {
background: #797979 !important; background: #797979 !important;
border: 1px solid #444444 !important; border: 1px solid #444444 !important;
border-width: 1px 0 0 !important; border-width: 1px 0 0 !important;
@ -45,7 +47,7 @@
.tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"] .tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"]
.tabs-stack, .tabs-stack,
:root:not([active="true"]) :root:not([active="true"])
#TabsToolbar .tabbrowser-tabs[treestyletab-style="metal"][treestyletab-mode="vertical"] { tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"] .tabbrowser-strip {
background: #acacac !important; background: #acacac !important;
border-color: #797979 !important; border-color: #797979 !important;
} }

View File

@ -16,12 +16,12 @@
/* Background colour for the tree sidebar (light blue when window is /* Background colour for the tree sidebar (light blue when window is
active, grey otherwise) */ active, grey otherwise) */
.tabbrowser-tabs[treestyletab-style="sidebar"][treestyletab-mode="vertical"] { tabbrowser[treestyletab-style="sidebar"][treestyletab-mode="vertical"] .tabbrowser-strip {
background: transparent !important; background: transparent !important;
background-color: #d4dde5 !important; background-color: #d4dde5 !important;
} }
#main-window:not([active="true"]) #main-window:not([active="true"])
.tabbrowser-tabs[treestyletab-style="sidebar"][treestyletab-mode="vertical"] { tabbrowser[treestyletab-style="sidebar"][treestyletab-mode="vertical"] .tabbrowser-strip {
background-color: #e8e8e8 !important; background-color: #e8e8e8 !important;
} }
@ -238,9 +238,11 @@ tabbrowser[treestyletab-style="sidebar"][treestyletab-mode="vertical"] .treestyl
/* changed from original SidebarStyleTab */ /* changed from original SidebarStyleTab */
#TabsToolbar[treestyletab-style="sidebar"][treestyletab-mode="vertical"]:not([treestyletab-tabbar-position="top"]) { #TabsToolbar[treestyletab-style="sidebar"][treestyletab-mode="vertical"]:not([treestyletab-tabbar-position="top"]) {
background: transparent !important;
border: 0 none !important; border: 0 none !important;
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
-moz-appearance: none !important;
-moz-box-shadow: none !important; -moz-box-shadow: none !important;
} }

View File

@ -5,7 +5,14 @@
/* Default style */ /* Default style */
.tabbrowser-tabs[treestyletab-style~="square"][treestyletab-mode="vertical"], .tabbrowser-tabs[treestyletab-style~="square"][treestyletab-mode="vertical"],
.tabbrowser-tabs[treestyletab-style~="square"][treestyletab-tabbar-position="bottom"] { #TabsToolbar[treestyletab-style~="square"][treestyletab-mode="vertical"],
.tabbrowser-tabs[treestyletab-style~="square"][treestyletab-tabbar-position="bottom"],
#TabsToolbar[treestyletab-style~="square"][treestyletab-tabbar-position="bottom"] {
background: transparent !important;
-moz-appearance: none;
}
tabbrowser[treestyletab-style~="square"][treestyletab-mode="vertical"] .tabbrowser-strip,
tabbrowser[treestyletab-style~="square"][treestyletab-tabbar-position="bottom"] .tabbrowser-strip {
background: darkgray !important; background: darkgray !important;
-moz-appearance: none; -moz-appearance: none;
} }