Revert "add style.transparent option."

This reverts commit 8eaf7bab37758c1b1c94b46d8a52531d88d37519.
This commit is contained in:
Christopher Jeffrey 2015-04-06 21:12:17 -07:00
parent 8eaf7bab37
commit b950e34459
2 changed files with 9 additions and 30 deletions

View File

@ -2050,7 +2050,6 @@ function Element(options) {
this.style.blink = options.blink;
this.style.inverse = options.inverse;
this.style.invisible = options.invisible;
this.style.transparent = options.transparent;
}
this.hidden = options.hidden || false;
@ -3804,11 +3803,7 @@ Element.prototype.render = function() {
// To deal with this, we can just fill the whole thing
// ahead of time. This could be optimized.
if (this.tpadding || (this.valign && this.valign !== 'top')) {
if (this.style.transparent) {
this.screen.fillRegion(darken(dattr), bch, xi, xl, yi, yl);
} else {
this.screen.fillRegion(dattr, bch, xi, xl, yi, yl);
}
this.screen.fillRegion(dattr, bch, xi, xl, yi, yl);
}
if (this.tpadding) {
@ -3876,31 +3871,19 @@ Element.prototype.render = function() {
for (; x < xl; x++) {
cell = lines[y][x];
if (!cell) break;
if (this.style.transparent) {
lines[y][x][0] = darken(attr);
if (content[ci]) lines[y][x][1] = ch;
if (attr !== cell[0] || ch !== cell[1]) {
lines[y][x][0] = attr;
lines[y][x][1] = ch;
lines[y].dirty = true;
} else {
if (attr !== cell[0] || ch !== cell[1]) {
lines[y][x][0] = attr;
lines[y][x][1] = ch;
lines[y].dirty = true;
}
}
}
continue;
}
if (this.style.transparent) {
lines[y][x][0] = darken(attr);
if (content[ci]) lines[y][x][1] = ch;
if (attr !== cell[0] || ch !== cell[1]) {
lines[y][x][0] = attr;
lines[y][x][1] = ch;
lines[y].dirty = true;
} else {
if (attr !== cell[0] || ch !== cell[1]) {
lines[y][x][0] = attr;
lines[y][x][1] = ch;
lines[y].dirty = true;
}
}
// if (wideChars.test(ch)) {

View File

@ -28,13 +28,9 @@ var over = blessed.box({
width: '50%',
height: '50%',
style: {
bg: 'red',
transparent: true
bg: 'red'
},
border: 'line',
draggable: true,
tags: true,
content: '{yellow-fg}{bold} --Foo-- {/}'
content: 'Foo'
});
screen.key('q', function() {