diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js index 9bbafd45..09285395 100644 --- a/content/treestyletab/config.js +++ b/content/treestyletab/config.js @@ -40,7 +40,6 @@ function init() function initAppearancePane() { onChangeTabbarPosition(); - onChangeTabbarStyle(); var sidebarItem = document.getElementById('extensions.treestyletab.tabbar.style-sidebar'); if (comparator.compare(XULAppInfo.version, '3.6') >= 0) @@ -201,33 +200,6 @@ function onChangeTabbarPosition(aOnChange) gTabbarPlacePositionInitialized = true; } -function onChangeTabbarStyle() -{ - var twisty = document.getElementById('extensions.treestyletab.twisty.style'); - var twistyRadio = document.getElementById('extensions.treestyletab.twisty.style-radiogroup'); - - var disabledItems = ['retro', 'modern-white', 'modern-black'] - .map(function(aStyle) { - return twistyRadio.getElementsByAttribute('value', aStyle)[0]; - }); - - var style = document.getElementById('extensions.treestyletab.tabbar.style-radiogroup').value; - if (style == 'sidebar') { - if (twistyRadio.value != 'auto' && - twistyRadio.value != 'none') { - twistyRadio.value = twisty.value = 'auto'; - } - disabledItems.forEach(function(aNode) { - aNode.setAttribute('disabled', true); - }); - } - else { - disabledItems.forEach(function(aNode) { - aNode.removeAttribute('disabled'); - }); - } -} - var gAutoHideModeRadio, gAutoHideModeToggle, diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index 723ed87f..cf5bbd6c 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -147,8 +147,7 @@ + orient="vertical"> + diff --git a/content/treestyletab/res/twisty-osx.png b/content/treestyletab/res/twisty-osx.png new file mode 100644 index 00000000..872219b3 Binary files /dev/null and b/content/treestyletab/res/twisty-osx.png differ diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 461376c9..2b3c2e07 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1257,7 +1257,10 @@ TreeStyleTabBrowser.prototype = { case 'extensions.treestyletab.twisty.style': if (value == 'auto') { - if ( + if (this.getTreePref('tabbar.style') == 'sidebar') { + value = 'osx'; + } + else if ( window['piro.sakura.ne.jp'].extensions.isAvailable('informationaltab@piro.sakura.ne.jp') && this.getPref('extensions.informationaltab.thumbnail.enabled') && this.getPref('extensions.informationaltab.thumbnail.position') < 100 diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd index 8644d05f..943a982a 100644 --- a/locale/de-DE/treestyletab/treestyletab.dtd +++ b/locale/de-DE/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index 014c7e0e..d681ae34 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index b31319da..57621f8c 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index 62392738..ea20fd0c 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index 60d5a638..744e7653 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/pl-PL/treestyletab/treestyletab.dtd b/locale/pl-PL/treestyletab/treestyletab.dtd index df56e040..dac93131 100644 --- a/locale/pl-PL/treestyletab/treestyletab.dtd +++ b/locale/pl-PL/treestyletab/treestyletab.dtd @@ -34,6 +34,7 @@ + diff --git a/locale/ru-RU/treestyletab/treestyletab.dtd b/locale/ru-RU/treestyletab/treestyletab.dtd index ca8f589f..0b8c0708 100755 --- a/locale/ru-RU/treestyletab/treestyletab.dtd +++ b/locale/ru-RU/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index cee53193..0fe4b14f 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd index 20382c3b..2e1efed4 100644 --- a/locale/zh-TW/treestyletab/treestyletab.dtd +++ b/locale/zh-TW/treestyletab/treestyletab.dtd @@ -33,6 +33,7 @@ + diff --git a/skin/classic/treestyletab/twisty/twisty-osx-l.png b/skin/classic/treestyletab/twisty/twisty-osx-l.png new file mode 100644 index 00000000..ab68feab Binary files /dev/null and b/skin/classic/treestyletab/twisty/twisty-osx-l.png differ diff --git a/skin/classic/treestyletab/twisty/twisty-osx-r.png b/skin/classic/treestyletab/twisty/twisty-osx-r.png new file mode 100644 index 00000000..fb445e6f Binary files /dev/null and b/skin/classic/treestyletab/twisty/twisty-osx-r.png differ diff --git a/skin/classic/treestyletab/twisty/twisty.css b/skin/classic/treestyletab/twisty/twisty.css index a6a2b662..49b40d37 100644 --- a/skin/classic/treestyletab/twisty/twisty.css +++ b/skin/classic/treestyletab/twisty/twisty.css @@ -13,14 +13,14 @@ tabbrowser[treestyletab-tab-contents-inverted="true"] } tabbrowser[treestyletab-twisty-style^="modern"] .treestyletab-twisty-container, -tabbrowser[treestyletab-style="sidebar"] +tabbrowser[treestyletab-twisty-style^="osx"] .treestyletab-twisty-container { position: relative; margin: 0 14px 0 -14px; } tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container, -tabbrowser[treestyletab-style="sidebar"][treestyletab-tab-contents-inverted="true"] +tabbrowser[treestyletab-twisty-style^="osx"][treestyletab-tab-contents-inverted="true"] .treestyletab-twisty-container { margin: 0 -14px 0 14px; } @@ -38,19 +38,19 @@ tabbrowser[treestyletab-twisty-style="retro"][treestyletab-mode="horizontal"][tr } tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="horizontal"] .tab-icon, -tabbrowser[treestyletab-style="sidebar"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="horizontal"] +tabbrowser[treestyletab-twisty-style^="osx"][treestyletab-allow-subtree-collapse="true"][treestyletab-mode="horizontal"] .tab-icon { margin-left: 12px; } tabbrowser[treestyletab-twisty-style^="modern"][treestyletab-allow-subtree-collapse="true"]:not([treestyletab-tab-contents-inverted="true"]) .tab-icon, -tabbrowser[treestyletab-style="sidebar"][treestyletab-allow-subtree-collapse="true"]:not([treestyletab-tab-contents-inverted="true"]) +tabbrowser[treestyletab-twisty-style^="osx"][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-tab-contents-inverted="true"] .tab-icon, -tabbrowser[treestyletab-style="sidebar"][treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"] +tabbrowser[treestyletab-twisty-style^="osx"][treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"] .tab-icon { margin-right: 9px; } @@ -60,40 +60,44 @@ tabbrowser[treestyletab-style="sidebar"][treestyletab-allow-subtree-collapse="tr -moz-image-region: rect(0, 32px, 16px, 16px); } tabbrowser[treestyletab-twisty-style="modern-black"] - .treestyletab-twisty, -tabbrowser[treestyletab-style="sidebar"] - .tabbrowser-tab:not([selected="true"]) .treestyletab-twisty { + .treestyletab-twisty { list-style-image: url("twisty-modern-b-l.png"); } tabbrowser[treestyletab-twisty-style="modern-black"][treestyletab-tab-contents-inverted="true"] - .treestyletab-twisty, -tabbrowser[treestyletab-style="sidebar"][treestyletab-tab-contents-inverted="true"] - .tabbrowser-tab:not([selected="true"]) .treestyletab-twisty { + .treestyletab-twisty { list-style-image: url("twisty-modern-b-r.png"); } tabbrowser[treestyletab-twisty-style="modern-white"] - .treestyletab-twisty, -tabbrowser[treestyletab-style="sidebar"] - .tabbrowser-tab[selected="true"] .treestyletab-twisty { + .treestyletab-twisty { list-style-image: url("twisty-modern-w-l.png"); } tabbrowser[treestyletab-twisty-style="modern-white"][treestyletab-tab-contents-inverted="true"] - .treestyletab-twisty, -tabbrowser[treestyletab-style="sidebar"][treestyletab-tab-contents-inverted="true"] - .tabbrowser-tab[selected="true"] .treestyletab-twisty { + .treestyletab-twisty { list-style-image: url("twisty-modern-w-r.png"); } +tabbrowser[treestyletab-twisty-style="osx"] + .treestyletab-twisty { + list-style-image: url("twisty-osx-l.png"); +} +tabbrowser[treestyletab-twisty-style="osx"][treestyletab-tab-contents-inverted="true"] + .treestyletab-twisty { + list-style-image: url("twisty-osx-r.png"); +} .tabbrowser-tab[treestyletab-subtree-collapsed="true"] .treestyletab-twisty { -moz-image-region: rect(0, 16px, 16px, 0); } -.tabbrowser-tab[treestyletab-twisty-hover="true"] - .treestyletab-twisty { +tabbrowser:not([treestyletab-twisty-style="osx"]) + .tabbrowser-tab[treestyletab-twisty-hover="true"] .treestyletab-twisty, +tabbrowser[treestyletab-twisty-style="osx"] + .tabbrowser-tab[selected="true"] .treestyletab-twisty { -moz-image-region: rect(16px, 32px, 32px, 16px); } -.tabbrowser-tab[treestyletab-subtree-collapsed="true"][treestyletab-twisty-hover="true"] - .treestyletab-twisty { +tabbrowser:not([treestyletab-twisty-style="osx"]) + .tabbrowser-tab[treestyletab-subtree-collapsed="true"][treestyletab-twisty-hover="true"] .treestyletab-twisty, +tabbrowser[treestyletab-twisty-style="osx"] + .tabbrowser-tab[treestyletab-subtree-collapsed="true"][selected="true"] .treestyletab-twisty { -moz-image-region: rect(16px, 16px, 32px, 0); }