don't stretch tab contents if the binding is overridden (e.g. by Tab Mix Plus)

This commit is contained in:
SHIMODA Hiroshi 2011-01-17 10:17:56 +09:00
parent 4f3c5fda8e
commit eb17d17aba

View File

@ -769,13 +769,13 @@ TreeStyleTabBrowser.prototype = {
label.parentNode.insertBefore(counter, label.nextSibling); label.parentNode.insertBefore(counter, label.nextSibling);
} }
// This causes http://piro.sakura.ne.jp/cgi-bin/bbs.cgi?2820 ...
// If TMP is not installed, there is "image-middle" box between tab-icon and tab-content.
// The box has align="center" so the problem doesn't appear if TMP is not installed.
// TMP applies its custom binding and it doesn't have image-middle box...
var tabContentBox = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-content'); var tabContentBox = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-content');
if (tabContentBox) if (tabContentBox &&
(tabContentBox.firstChild.className || '').indexOf('tab-image-') > -1) {
// Set stretched only if the tabFx2Compatible.xml is applied.
// Tab Mix Plus overrides the binding so icons are wrongly stretched.
tabContentBox.setAttribute('align', this.isVertical ? 'stretch' : 'center' ); tabContentBox.setAttribute('align', this.isVertical ? 'stretch' : 'center' );
}
this.initTabContentsOrder(aTab); this.initTabContentsOrder(aTab);
}, },
@ -2436,6 +2436,7 @@ TreeStyleTabBrowser.prototype = {
nextTab = this.getNextTab(tabs[tabs.length-1]); nextTab = this.getNextTab(tabs[tabs.length-1]);
} }
var prevParent = this.getParentTab(prevTab); var prevParent = this.getParentTab(prevTab);
var nextParent = this.getParentTab(nextTab); var nextParent = this.getParentTab(nextTab);