タブバーのスプリッタ中央のグリッピーをクリックした時にタブバーを開閉するようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1538 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-11-09 15:13:25 +00:00
parent 17d066866f
commit e2b536c005
2 changed files with 8 additions and 4 deletions

View File

@ -16,7 +16,7 @@ tabbrowser[treestyletab-allow-subtree-collapse="true"] .tabbrowser-tab[treestyle
} }
tabbrowser[treestyletab-allow-subtree-collapse="true"] .tabbrowser-tab[treestyletab-collapsed="true"], tabbrowser[treestyletab-allow-subtree-collapse="true"] .tabbrowser-tab[treestyletab-collapsed="true"],
.tabbrowser-strip[collapsed="true"]+splitter, .tabbrowser-strip[collapsed="true"]+splitter:not([state="collapsed"]),
tabbrowser[treestyletab-tabbar-autohide="true"] .tabbrowser-strip, tabbrowser[treestyletab-tabbar-autohide="true"] .tabbrowser-strip,
tabbrowser[treestyletab-tabbar-autohide="true"] .tabbrowser-strip+splitter, tabbrowser[treestyletab-tabbar-autohide="true"] .tabbrowser-strip+splitter,
#appcontent[ahFull="true"] .tabbrowser-strip[ahHIDE="true"]+splitter /* AutoHide */ { #appcontent[ahFull="true"] .tabbrowser-strip[ahHIDE="true"]+splitter /* AutoHide */ {

View File

@ -2082,6 +2082,7 @@ catch(e) {
splitter = document.createElement('splitter'); splitter = document.createElement('splitter');
splitter.setAttribute('class', this.kSPLITTER); splitter.setAttribute('class', this.kSPLITTER);
splitter.setAttribute('onmouseup', 'TreeStyleTabService.onTabbarResized(event);'); splitter.setAttribute('onmouseup', 'TreeStyleTabService.onTabbarResized(event);');
splitter.setAttribute('state', 'open');
splitter.appendChild(document.createElement('grippy')); splitter.appendChild(document.createElement('grippy'));
var ref = aTabBrowser.mPanelContainer; var ref = aTabBrowser.mPanelContainer;
ref.parentNode.insertBefore(splitter, ref); ref.parentNode.insertBefore(splitter, ref);
@ -2105,7 +2106,7 @@ catch(e) {
aTabBrowser.mTabContainer.setAttribute('align', 'stretch'); // for Mac OS X aTabBrowser.mTabContainer.setAttribute('align', 'stretch'); // for Mac OS X
scrollInnerBox.removeAttribute('flex'); scrollInnerBox.removeAttribute('flex');
aTabBrowser.mPanelContainer.removeAttribute('width'); aTabBrowser.mStrip.removeAttribute('width');
aTabBrowser.mStrip.setAttribute('width', this.getTreePref('tabbar.width')); aTabBrowser.mStrip.setAttribute('width', this.getTreePref('tabbar.width'));
aTabBrowser.setAttribute(this.kMODE, 'vertical'); aTabBrowser.setAttribute(this.kMODE, 'vertical');
@ -2119,12 +2120,14 @@ catch(e) {
aTabBrowser.removeAttribute(this.kUI_INVERTED); aTabBrowser.removeAttribute(this.kUI_INVERTED);
this.levelMarginProp = 'margin-left'; this.levelMarginProp = 'margin-left';
} }
window.setTimeout(function() { window.setTimeout(function(aWidth) {
aTabBrowser.mStrip.setAttribute('width', aWidth);
aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1); aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1);
aTabBrowser.mStrip.setAttribute('ordinal', 30); aTabBrowser.mStrip.setAttribute('ordinal', 30);
splitter.setAttribute('ordinal', 20); splitter.setAttribute('ordinal', 20);
aTabBrowser.mPanelContainer.setAttribute('ordinal', 10); aTabBrowser.mPanelContainer.setAttribute('ordinal', 10);
}, 0); splitter.setAttribute('collapse', 'after');
}, 0, this.getTreePref('tabbar.width'));
} }
else { else {
aTabBrowser.setAttribute(this.kTABBAR_POSITION, 'left'); aTabBrowser.setAttribute(this.kTABBAR_POSITION, 'left');
@ -2135,6 +2138,7 @@ catch(e) {
aTabBrowser.mStrip.setAttribute('ordinal', 10); aTabBrowser.mStrip.setAttribute('ordinal', 10);
splitter.setAttribute('ordinal', 20); splitter.setAttribute('ordinal', 20);
aTabBrowser.mPanelContainer.setAttribute('ordinal', 30); aTabBrowser.mPanelContainer.setAttribute('ordinal', 30);
splitter.setAttribute('collapse', 'before');
}, 0); }, 0);
} }
} }