Open HotelCalifornia opened 1 year ago
dug around in the code a bit and found a comment regarding a naive heuristic for the size of the generated Color image. confirmed that specifying height and width manually caused the configuration to work as expected
background = {
{
source = {
Color = 'black',
},
-- here:
height = '100%',
width = '100%',
},
{
source = {
File = '/path/to/some/image.jpg',
},
hsb = {
brightness = 0.06056213162296187,
},
height = 'Contain',
repeat_y = 'NoRepeat',
vertical_align = 'Middle',
},
},
recommend making a note of this in the docs
Perhaps the default width/height for Color backgrounds should be set to Contain
instead of Cover
?
Perhaps the default width/height for Color backgrounds should be set to
Contain
instead ofCover
?
i tried removing the second background layer to test the default behavior and it worked as i expected (covered the entire window.... so it seems like maybe this is more to do with the layer compositing? though as i mentioned above layering two images on top of one another worked just fine.
given the following configuration (wezterm version
20221119-145034-49b9839f
and nightly version20221127-215232-c6e29b78
)I'd expect solid black to be rendered underneath the background image. instead, since the image height is set to Contain and the vertical align to Middle, there are two transparent strips above and below the image
I tried with a number of other values for Color (in addition to the named one above), including
'rgb(183, 198, 213)'
and the equivalent'#b7c6d5'
but nothing changes.using the following config works as a hacky workaround (lower image is not bounded by Contain so you kinda get the desired effect but it doesn't work for images that have content by the edges) so i know that the layer compositing itself is working.