flexible toolbar items in the vertical tab bar were hidden if there are too many tabs

This commit is contained in:
SHIMODA Hiroshi 2011-03-15 01:23:30 +09:00
parent 79ed882157
commit 1d47d59bac
2 changed files with 30 additions and 1 deletions

View File

@ -153,7 +153,15 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide="
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab {
.tabbrowser-tab,
toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> toolbarbutton,
toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> .treestyletab-toolbar-inner-box > toolbarbutton,
toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> toolbaritem,
toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> .treestyletab-toolbar-inner-box > toolbaritem {
-moz-box-flex: 0 !important;
}

View File

@ -950,6 +950,15 @@ TreeStyleTabBrowser.prototype = {
this.removeTabStripAttribute('height');
b.mPanelContainer.removeAttribute('height');
if (strip.localName == 'toolbar') {
Array.forEach(strip.childNodes, function(aNode) {
if (aNode.localName == 'tabs')
return;
aNode.setAttribute('treestyletab-backup-flex', aNode.getAttribute('flex'));
aNode.removeAttribute('flex');
}, this);
}
if (pos == this.kTABBAR_RIGHT) {
this.setTabbrowserAttribute(this.kTABBAR_POSITION, 'right');
if (this.getTreePref('tabbar.invertTab')) {
@ -1020,6 +1029,18 @@ TreeStyleTabBrowser.prototype = {
this.setTabbrowserAttribute(this.kMODE, this.getTreePref('tabbar.multirow') ? 'multirow' : 'horizontal');
this.removeTabbrowserAttribute(this.kTAB_INVERTED);
if (strip.localName == 'toolbar') {
Array.forEach(strip.childNodes, function(aNode) {
if (aNode.localName == 'tabs')
return;
var flex = aNode.hasAttribute('treestyletab-backup-flex');
if (!flex)
return;
aNode.setAttribute('flex', flex);
aNode.removeAttribute('treestyletab-backup-flex');
}, this);
}
if (pos == this.kTABBAR_BOTTOM) {
this.setTabbrowserAttribute(this.kTABBAR_POSITION, 'bottom');
this.indentTarget = 'bottom';