diff --git a/lib/widget.js b/lib/widget.js index c934c84..a2bf6a6 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -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)) { diff --git a/test/widget-shadow.js b/test/widget-shadow.js index 17fc579..9e76bcd 100644 --- a/test/widget-shadow.js +++ b/test/widget-shadow.js @@ -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() {