タブバーの位置にかかわらずタブの内容を反転できるようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4406 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
5d6ea90b14
commit
25ebc89ffd
@ -86,7 +86,7 @@ function onChangeTabbarPosition(aOnChange)
|
||||
|
||||
invertScrollbar.disabled = pos != 'left';
|
||||
invertTab.disabled = pos != 'right';
|
||||
invertTabContents.disabled = pos != 'right';
|
||||
// invertTabContents.disabled = pos != 'right';
|
||||
invertClosebox.setAttribute('label',
|
||||
invertClosebox.getAttribute(
|
||||
(pos == 'right' && invertTabContents.checked) ?
|
||||
@ -94,6 +94,10 @@ function onChangeTabbarPosition(aOnChange)
|
||||
'label-left'
|
||||
)
|
||||
);
|
||||
if (invertClosebox.checked != document.getElementById('extensions.treestyletab.tabbar.invertClosebox').defaultValue)
|
||||
invertClosebox.removeAttribute('collapsed');
|
||||
else
|
||||
invertClosebox.setAttribute('collapsed', true);
|
||||
|
||||
if (comparator.compare(XULAppInfo.version, '3.0') < 0) {
|
||||
invertScrollbar.removeAttribute('collapsed');
|
||||
|
@ -94,10 +94,6 @@
|
||||
preference="extensions.treestyletab.tabbar.invertTab"
|
||||
label="&config.tabbar.invertTab;"
|
||||
disabled="true"/>
|
||||
<checkbox id="extensions.treestyletab.tabbar.invertTabContents-check"
|
||||
preference="extensions.treestyletab.tabbar.invertTabContents"
|
||||
label="&config.tabbar.invertTabContents;"
|
||||
disabled="true"/>
|
||||
</vbox>
|
||||
</row>
|
||||
<row>
|
||||
@ -108,11 +104,16 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</radiogroup>
|
||||
<checkbox id="extensions.treestyletab.tabbar.invertClosebox-check"
|
||||
preference="extensions.treestyletab.tabbar.invertClosebox"
|
||||
label="&config.tabbar.invertClosebox.left;"
|
||||
label-left="&config.tabbar.invertClosebox.left;"
|
||||
label-right="&config.tabbar.invertClosebox.right;"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="extensions.treestyletab.tabbar.invertTabContents-check"
|
||||
preference="extensions.treestyletab.tabbar.invertTabContents"
|
||||
label="&config.tabbar.invertTabContents;"/>
|
||||
<checkbox id="extensions.treestyletab.tabbar.invertClosebox-check"
|
||||
preference="extensions.treestyletab.tabbar.invertClosebox"
|
||||
label="&config.tabbar.invertClosebox.left;"
|
||||
label-left="&config.tabbar.invertClosebox.left;"
|
||||
label-right="&config.tabbar.invertClosebox.right;"/>
|
||||
</hbox>
|
||||
<checkbox id="extensions.treestyletab.allowSubtreeCollapseExpand-check"
|
||||
preference="extensions.treestyletab.allowSubtreeCollapseExpand"
|
||||
label="&config.allowSubtreeCollapseExpand;"/>
|
||||
|
@ -490,6 +490,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.twisty.style');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.showBorderForFirstTab');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.enableSubtreeIndent');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.invertTabContents');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.invertScrollbar');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.invertClosebox');
|
||||
this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.hideNewTabButton');
|
||||
@ -658,8 +659,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var label = this.getTabLabel(aTab);
|
||||
var close = this.getTabClosebox(aTab);
|
||||
var counter = document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER_CONTAINER);
|
||||
var inverted = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION) == 'right' &&
|
||||
this.mTabBrowser.getAttribute(this.kTAB_CONTENTS_INVERTED) == 'true';
|
||||
var inverted = this.mTabBrowser.getAttribute(this.kTAB_CONTENTS_INVERTED) == 'true';
|
||||
|
||||
// top-level contents
|
||||
var nodes = Array.slice(document.getAnonymousNodes(aTab));
|
||||
@ -815,12 +815,6 @@ TreeStyleTabBrowser.prototype = {
|
||||
b.removeAttribute(this.kTAB_INVERTED);
|
||||
this.indentProp = 'margin-left';
|
||||
}
|
||||
if (this.getTreePref('tabbar.invertTabContents')) {
|
||||
b.setAttribute(this.kTAB_CONTENTS_INVERTED, 'true');
|
||||
}
|
||||
else {
|
||||
b.removeAttribute(this.kTAB_CONTENTS_INVERTED);
|
||||
}
|
||||
window.setTimeout(function(aWidth) {
|
||||
/* in Firefox 3, the width of the rightside tab bar
|
||||
unexpectedly becomes 0 on the startup. so, we have
|
||||
@ -837,7 +831,6 @@ TreeStyleTabBrowser.prototype = {
|
||||
else {
|
||||
b.setAttribute(this.kTABBAR_POSITION, 'left');
|
||||
b.removeAttribute(this.kTAB_INVERTED);
|
||||
b.removeAttribute(this.kTAB_CONTENTS_INVERTED);
|
||||
this.indentProp = 'margin-left';
|
||||
window.setTimeout(function() {
|
||||
b.mTabDropIndicatorBar.setAttribute('ordinal', 1);
|
||||
@ -887,7 +880,6 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
b.setAttribute(this.kMODE, this.getTreePref('tabbar.multirow') ? 'multirow' : 'horizontal' );
|
||||
b.removeAttribute(this.kTAB_INVERTED);
|
||||
b.removeAttribute(this.kTAB_CONTENTS_INVERTED);
|
||||
if (pos == this.kTABBAR_BOTTOM) {
|
||||
b.setAttribute(this.kTABBAR_POSITION, 'bottom');
|
||||
this.indentProp = 'margin-bottom';
|
||||
|
@ -9,7 +9,7 @@ pref("extensions.treestyletab.tabbar.position.subbrowser.enabled", false);
|
||||
pref("extensions.treestyletab.tabbar.multirow", false);
|
||||
pref("extensions.treestyletab.tabbar.invertScrollbar", true);
|
||||
pref("extensions.treestyletab.tabbar.invertTab", true);
|
||||
pref("extensions.treestyletab.tabbar.invertTabContents", true);
|
||||
pref("extensions.treestyletab.tabbar.invertTabContents", false);
|
||||
pref("extensions.treestyletab.tabbar.invertClosebox", false);
|
||||
pref("extensions.treestyletab.tabbar.hideNewTabButton", false);
|
||||
pref("extensions.treestyletab.tabbar.hideAlltabsButton", true);
|
||||
|
@ -110,9 +110,9 @@ tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"]
|
||||
.tabbrowser-tab[selected="true"]:hover .tab-icon {
|
||||
background: url("metal/icon-bg.png") no-repeat right center !important;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-tab-contents-inverted="true"]
|
||||
.tabbrowser-tab:hover .tab-icon,
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-tab-contents-inverted="true"]
|
||||
.tabbrowser-tab[selected="true"]:hover .tab-icon {
|
||||
background-position: left center !important;
|
||||
}
|
||||
@ -123,7 +123,7 @@ tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"]
|
||||
height: 16px !important;
|
||||
margin: 0 0 0 6px !important;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-tab-contents-inverted="true"]
|
||||
.tabbrowser-tab .tab-icon .tab-icon-image {
|
||||
margin: 0 6px 0 0 !important;
|
||||
}
|
||||
@ -155,19 +155,19 @@ tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treest
|
||||
.treestyletab-twisty-container {
|
||||
margin: 0;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treestyletab-mode="vertical"]:not([treestyletab-tab-contents-inverted="true"])
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"]:not([treestyletab-tab-contents-inverted="true"])
|
||||
.tabbrowser-tab .tab-icon {
|
||||
margin-left: -6px !important;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style][treestyletab-tab-contents-inverted="true"]
|
||||
.treestyletab-twisty-container {
|
||||
margin: 0 -12px 0 12px;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treestyletab-tab-contents-inverted="true"]
|
||||
.treestyletab-twisty-container {
|
||||
margin: 0 -6px 0 6px;
|
||||
}
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
|
||||
tabbrowser[treestyletab-style="metal"][treestyletab-twisty-style="retro"][treestyletab-tab-contents-inverted="true"]
|
||||
.tabbrowser-tab .tab-icon {
|
||||
margin-right: -6px !important;
|
||||
}
|
||||
|
@ -7,14 +7,14 @@
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
tabbrowser[treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container {
|
||||
tabbrowser[treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container {
|
||||
margin: 0 -3px 0 3px;
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style^="modern"] .treestyletab-twisty-container {
|
||||
position: relative;
|
||||
margin: 0 14px 0 -14px;
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container {
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container {
|
||||
margin: 0 -14px 0 14px;
|
||||
}
|
||||
|
||||
@ -30,10 +30,10 @@ tabbrowser[treestyletab-twisty-style="retro"][treestyletab-mode="horizontal"][tr
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="horizontal"] .tab-icon {
|
||||
margin-left: 12px;
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="vertical"]:not([treestyletab-tab-contents-inverted="true"]) .tab-icon {
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"]:not([treestyletab-tab-contents-inverted="true"]) .tab-icon {
|
||||
margin-left: 9px;
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"] .tab-icon {
|
||||
tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"] .tab-icon {
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
@ -44,13 +44,13 @@ tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-colla
|
||||
tabbrowser[treestyletab-twisty-style="modern-black"] .treestyletab-twisty {
|
||||
list-style-image: url("twisty-modern-b-l.png");
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style="modern-black"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty {
|
||||
tabbrowser[treestyletab-twisty-style="modern-black"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty {
|
||||
list-style-image: url("twisty-modern-b-r.png");
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style="modern-white"] .treestyletab-twisty {
|
||||
list-style-image: url("twisty-modern-w-l.png");
|
||||
}
|
||||
tabbrowser[treestyletab-twisty-style="modern-white"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty {
|
||||
tabbrowser[treestyletab-twisty-style="modern-white"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty {
|
||||
list-style-image: url("twisty-modern-w-r.png");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user