From a3c4b4552e61b91f16226742f8d0e1f11ab64e05 Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 12 May 2009 12:23:51 +0000 Subject: [PATCH] =?UTF-8?q?Mac=20OS=20X=E3=81=A7=E3=81=AF=E4=B8=8A?= =?UTF-8?q?=E3=81=AB=E7=BD=AE=E3=81=84=E3=81=9F=E3=82=BF=E3=83=96=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=AF=E4=B8=8B=E3=81=AE=E3=83=9E=E3=83=BC=E3=82=B8=E3=83=B3?= =?UTF-8?q?=E3=81=A7=E5=8F=96=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4409 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 12 ++-- defaults/preferences/treestyletab.js | 4 ++ .../defaults/preferences/treestyletab.js | 1 + .../classic/treestyletab/treestyletab.css | 55 +++++++++++++++++++ 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index a18f9c04..1d28fbba 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -809,11 +809,11 @@ TreeStyleTabBrowser.prototype = { b.setAttribute(this.kTABBAR_POSITION, 'right'); if (this.getTreePref('tabbar.invertTab')) { b.setAttribute(this.kTAB_INVERTED, 'true'); - this.indentProp = 'margin-right'; + this.indentProp = this.getTreePref('indent.property.right'); } else { b.removeAttribute(this.kTAB_INVERTED); - this.indentProp = 'margin-left'; + this.indentProp = this.getTreePref('indent.property.left'); } window.setTimeout(function(aWidth) { /* in Firefox 3, the width of the rightside tab bar @@ -831,7 +831,7 @@ TreeStyleTabBrowser.prototype = { else { b.setAttribute(this.kTABBAR_POSITION, 'left'); b.removeAttribute(this.kTAB_INVERTED); - this.indentProp = 'margin-left'; + this.indentProp = this.getTreePref('indent.property.left'); window.setTimeout(function() { b.mTabDropIndicatorBar.setAttribute('ordinal', 1); b.mStrip.setAttribute('ordinal', 10); @@ -882,7 +882,7 @@ TreeStyleTabBrowser.prototype = { b.removeAttribute(this.kTAB_INVERTED); if (pos == this.kTABBAR_BOTTOM) { b.setAttribute(this.kTABBAR_POSITION, 'bottom'); - this.indentProp = 'margin-bottom'; + this.indentProp = this.getTreePref('indent.property.bottom'); window.setTimeout(function() { b.mTabDropIndicatorBar.setAttribute('ordinal', 1); b.mStrip.setAttribute('ordinal', 30); @@ -893,7 +893,7 @@ TreeStyleTabBrowser.prototype = { } else { b.setAttribute(this.kTABBAR_POSITION, 'top'); - this.indentProp = 'margin-top'; + this.indentProp = this.getTreePref('indent.property.top'); window.setTimeout(function() { b.mTabDropIndicatorBar.setAttribute('ordinal', 1); b.mStrip.setAttribute('ordinal', 10); @@ -2826,7 +2826,7 @@ TreeStyleTabBrowser.prototype = { if (!aTab.parentNode) return; // ignore removed tabs if (multirow) { indent = Math.min(aLevel * 3, maxIndent); - var colors = '-moz-border-top-colors:'+(function(aNum) { + var colors = '-moz-border-'+topBottom+'-colors:'+(function(aNum) { var retVal = []; for (var i = 1; i < aNum; i++) { diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 8c3dfa94..8e654074 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -46,6 +46,10 @@ pref("extensions.treestyletab.autoExpand.delay", 500); pref("extensions.treestyletab.autoExpand.intelligently", true); pref("extensions.treestyletab.autoExpand.collapseFinally", false); pref("extensions.treestyletab.indent", 12); +pref("extensions.treestyletab.indent.property.left", "margin-left"); +pref("extensions.treestyletab.indent.property.right", "margin-right"); +pref("extensions.treestyletab.indent.property.top", "margin-top"); +pref("extensions.treestyletab.indent.property.bottom", "margin-bottom"); // 0 = first child, 1 = last child pref("extensions.treestyletab.insertNewChildAt", 1); pref("extensions.treestyletab.twisty.style", "auto"); // none, retro, modern-black, modern-white, auto diff --git a/platform/Darwin/defaults/preferences/treestyletab.js b/platform/Darwin/defaults/preferences/treestyletab.js index f119da2f..1163ca96 100644 --- a/platform/Darwin/defaults/preferences/treestyletab.js +++ b/platform/Darwin/defaults/preferences/treestyletab.js @@ -1 +1,2 @@ pref("extensions.treestyletab.tabbar.style", "metal"); +pref("extensions.treestyletab.indent.property.top", "margin-bottom"); diff --git a/platform/Darwin/skin/classic/treestyletab/treestyletab.css b/platform/Darwin/skin/classic/treestyletab/treestyletab.css index 270a69d0..4892a1ed 100644 --- a/platform/Darwin/skin/classic/treestyletab/treestyletab.css +++ b/platform/Darwin/skin/classic/treestyletab/treestyletab.css @@ -39,3 +39,58 @@ tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"] .tabbrowser-strip { border-bottom: 0 none !important; } + + +/* horizontal tree */ + +tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tabs { + height: auto; + background: #bbb; +} + +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tabs { + background: #777; +} + +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-middle, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-close-button, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-middle, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-close-button, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-middle, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-close-button, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-middle, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-close-button { + background-position: left bottom; + background-repeat: repeat-x; +} + +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-left, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-right, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-left, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab:not([selected="true"]) .tab-image-right, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-left, +#main-window[active="true"] tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-right, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-left, +#main-window:not([active="true"]) tabbrowser[treestyletab-style][treestyletab-mode="horizontal"][treestyletab-tabs-indented="true"] + .tabbrowser-tab[selected="true"] .tab-image-right { + background-position: left bottom; + background-repeat: no-repeat; +} +