diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 6dc4273c..1581841f 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -13,6 +13,7 @@ var TreeStyleTabService = { kVERTICAL : 'treestyletab-vertical', kINVERTED : 'treestyletab-appearance-inverted', kSTYLE : 'treestyletab-style', + kFIRSTTAB_BORDER : 'treestyletab-firsttab-border', kTWISTY : 'treestyletab-twisty', kTWISTY_CONTAINER : 'treestyletab-twisty-container', @@ -682,6 +683,7 @@ catch(e) { aTabBrowser.__treestyletab__observer = new TreeStyleTabBrowserObserver(aTabBrowser); aTabBrowser.__treestyletab__observer.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.style'); + aTabBrowser.__treestyletab__observer.observe(null, 'nsPref:changed', 'extensions.treestyletab.showBorderForFirstTab'); delete addTabMethod; delete removeTabMethod; @@ -2484,6 +2486,14 @@ TreeStyleTabBrowserObserver.prototype = { case 'extensions.treestyletab.tabbar.style': this.mTabBrowser.setAttribute(TreeStyleTabService.kSTYLE, value); + break; + + case 'extensions.treestyletab.showBorderForFirstTab': + if (value) + this.mTabBrowser.setAttribute(TreeStyleTabService.kFIRSTTAB_BORDER, true); + else + this.mTabBrowser.removeAttribute(TreeStyleTabService.kFIRSTTAB_BORDER); + break; default: break; diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index face1437..4d60bf78 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -4,6 +4,7 @@ pref("extensions.treestyletab.tabbar.invertUI", true); pref("extensions.treestyletab.tabbar.scroll.smooth", true); pref("extensions.treestyletab.tabbar.scroll.timeout", 250); pref("extensions.treestyletab.tabbar.style", "mixed"); +pref("extensions.treestyletab.showBorderForFirstTab", false); pref("extensions.treestyletab.levelMargin", 12); pref("extensions.treestyletab.show.openSelectionLinks", true); diff --git a/skin/classic/treestyletab/treestyletab.css b/skin/classic/treestyletab/treestyletab.css index e0b8b69d..08f7a0ab 100644 --- a/skin/classic/treestyletab/treestyletab.css +++ b/skin/classic/treestyletab/treestyletab.css @@ -28,6 +28,9 @@ tabbrowser[treestyletab-vertical="true"] .tabbrowser-tab { -moz-border-radius-bottomright : 0 !important; -moz-box-align: stretch !important; } +tabbrowser[treestyletab-vertical="true"][treestyletab-firsttab-border="true"] .tabbrowser-tab:first-child { + -moz-border-top-colors: ThreeDShadow ThreeDFace !important; +} tabbrowser[treestyletab-vertical="true"] .tabbrowser-tab[selected="true"] { margin: 0 !important; padding: 0 0.2em !important; @@ -35,6 +38,9 @@ tabbrowser[treestyletab-vertical="true"] .tabbrowser-tab[selected="true"] { -moz-border-top-colors: ThreeDHighlight ThreeDHighlight !important; -moz-border-bottom-colors: ThreeDShadow ThreeDHighlight !important; } +tabbrowser[treestyletab-vertical="true"][treestyletab-firsttab-border="true"] .tabbrowser-tab:first-child[selected="true"] { + -moz-border-top-colors: ThreeDShadow ThreeDHighlight !important; +} tabbrowser[treestyletab-vertical="true"] .tabbrowser-tab > .tab-image-left, tabbrowser[treestyletab-vertical="true"] .tabbrowser-tab > .tab-image-right { @@ -135,11 +141,17 @@ tabbrowser[treestyletab-vertical="true"][treestyletab-style="mixed"] .tabbrowser -moz-border-top-colors: #e0e8f6 #e0e8f6 !important; -moz-border-bottom-colors: ThreeDShadow #e0e8f6 !important; } +tabbrowser[treestyletab-vertical="true"][treestyletab-style="mixed"][treestyletab-firsttab-border="true"] .tabbrowser-tab:first-child:hover { + -moz-border-top-colors: ThreeDShadow #e0e8f6 !important; +} tabbrowser[treestyletab-vertical="true"][treestyletab-style="mixed"] .tabbrowser-tab[selected="true"] { background: #c1d2ee !important; -moz-border-top-colors: #c1d2ee #c1d2ee !important; -moz-border-bottom-colors: ThreeDShadow #c1d2ee !important; } +tabbrowser[treestyletab-vertical="true"][treestyletab-style="mixed"][treestyletab-firsttab-border="true"] .tabbrowser-tab:first-child[selected="true"] { + -moz-border-top-colors: ThreeDShadow #c1d2ee !important; +} tabbrowser[treestyletab-vertical="true"][treestyletab-style="mixed"] .tabbrowser-tab:hover, tabbrowser[treestyletab-vertical="true"][treestyletab-appearance-inverted="true"][treestyletab-style="mixed"] .tabbrowser-tab:hover { @@ -209,7 +221,8 @@ tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="self"] list-style-image: url("dropmarker-right.png"); } */ -tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="self"] { +tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="self"], +tabbrowser[treestyletab-vertical="true"][treestyletab-firsttab-border="true"] tab:first-child[treestyletab-drop-position="self"] { -moz-border-top-colors: -moz-dialogtext -moz-dialogtext !important; -moz-border-right-colors: -moz-dialogtext -moz-dialogtext !important; -moz-border-bottom-colors: -moz-dialogtext -moz-dialogtext !important; @@ -221,7 +234,8 @@ tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="before" list-style-image: url("dropmarker-up.png"); } */ -tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="before"] { +tabbrowser[treestyletab-vertical="true"] tab[treestyletab-drop-position="before"], +tabbrowser[treestyletab-vertical="true"][treestyletab-firsttab-border="true"] tab:first-child[treestyletab-drop-position="before"] { -moz-border-top-colors: -moz-dialogtext -moz-dialogtext !important; }