borderによるインデントで、一番内側の線の色を変えるようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1817 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
2ae7043475
commit
333e8935a4
@ -376,7 +376,7 @@ TreeStyleTabService.overrideExtensionsAfterInit = function() {
|
|||||||
window.getRowHeight.toSource().replace(
|
window.getRowHeight.toSource().replace(
|
||||||
'var tabs = getBrowser().mTabContainer.childNodes;',
|
'var tabs = getBrowser().mTabContainer.childNodes;',
|
||||||
<><![CDATA[
|
<><![CDATA[
|
||||||
var tabsResult = TreeStyleTabService.getVisibleTabs(getBrowser.selectedTab);
|
var tabsResult = TreeStyleTabService.getVisibleTabs(getBrowser().selectedTab);
|
||||||
var tabs = [];
|
var tabs = [];
|
||||||
for (var t = 0, maxt = tabsResult.snapshotLength; t < maxt; t++)
|
for (var t = 0, maxt = tabsResult.snapshotLength; t < maxt; t++)
|
||||||
tabs.push(tabsResult.snapshotItem(t));
|
tabs.push(tabsResult.snapshotItem(t));
|
||||||
|
@ -1912,16 +1912,30 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
var multirow = this.isMultiRow();
|
var multirow = this.isMultiRow();
|
||||||
var topBottom = this.levelMarginProp.match(/top|bottom/);
|
var topBottom = this.levelMarginProp.match(/top|bottom/);
|
||||||
var innerBoxes, j;
|
var innerBoxes,
|
||||||
|
j,
|
||||||
|
colors,
|
||||||
|
maxIndent = parseInt(aTabs[0].boxObject.height / 2);
|
||||||
|
dump(aLevel+'/'+maxIndent+'\n');
|
||||||
|
|
||||||
for (var i = 0, maxi = aTabs.length; i < maxi; i++)
|
for (var i = 0, maxi = aTabs.length; i < maxi; i++)
|
||||||
{
|
{
|
||||||
if (multirow) {
|
if (multirow) {
|
||||||
|
indent = Math.min(aLevel * 3, maxIndent);
|
||||||
innerBoxes = document.getAnonymousNodes(aTabs[i]);
|
innerBoxes = document.getAnonymousNodes(aTabs[i]);
|
||||||
|
colors = '-moz-border-top-colors:'+(function(aNum) {
|
||||||
|
var retVal = [];
|
||||||
|
for (var i = 1; i < aNum; i++)
|
||||||
|
{
|
||||||
|
retVal.push('transparent');
|
||||||
|
}
|
||||||
|
retVal.push('ThreeDShadow');
|
||||||
|
return retVal.length == 1 ? 'none' : retVal.join(' ') ;
|
||||||
|
})(indent)+' !important;';
|
||||||
for (j = 0, maxj = innerBoxes.length; j < maxj; j++)
|
for (j = 0, maxj = innerBoxes.length; j < maxj; j++)
|
||||||
{
|
{
|
||||||
if (innerBoxes[j].nodeType != Node.ELEMENT_NODE) continue;
|
if (innerBoxes[j].nodeType != Node.ELEMENT_NODE) continue;
|
||||||
innerBoxes[j].setAttribute('style', innerBoxes[j].getAttribute('style').replace(/border-(top|bottom).*:[^;]+;?/g, '')+'; border-'+topBottom+': solid transparent '+(aLevel * 4)+'px !important;');
|
innerBoxes[j].setAttribute('style', innerBoxes[j].getAttribute('style').replace(/(-moz-)?border-(top|bottom)(-[^:]*)?.*:[^;]+;?/g, '')+'; border-'+topBottom+': solid transparent '+indent+'px !important;'+colors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user