Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should background picture not splited while the terminal is split #608

Open
meison92 opened this issue Jun 13, 2022 · 4 comments
Open

should background picture not splited while the terminal is split #608

meison92 opened this issue Jun 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@meison92
Copy link

Is your feature request related to a problem? Please describe.
When I split the screen, the background picture is always stretched, which doesn't look very beautiful.

Describe the solution you'd like
Can I make the background picture not splited while the terminal is split

Describe alternatives you've considered
one terminator windows use one background img.

Additional context
image

@Vulcalien
Copy link
Member

Vulcalien commented Jun 13, 2022

Hi! That's really a think that should be implemented.

Right now, the image is drawn on the terminal widget, but i think it's totally possible to draw it on notebooks and the window itself.

Edit: one big problem I've thought about: the code for background images is per-profile. But having multiple terminals means it won't be possible to do it per-profile.
A few non-obvious design choises will have to be made.

@mattrose
Copy link
Member

we could have a background image in the global section, and a different background image in the profile section. That might look weird in some cases, and that is opening a can of worms layering what would have to be basically transparent vte terminals on top of notebooks or windows with a bg image.

One other thing we could do is to give a few options on how to handle the image other than just stretch the image, but given the layout presented in this issue, I'm not sure that any way of resizing the image would look acceptable. As you say, a few non-obvious design choices...

@mattrose mattrose added the enhancement New feature or request label Jun 20, 2022
@Vulcalien
Copy link
Member

Vulcalien commented Jun 21, 2022

I have a bunch of ideas about this. The layering would work perfectly. We just need to write to the notebook/window, without even modifying the way terminals draw. The notebook/window would be the bottom layer, the terminals would be the top layer.

The image would be visible only through transparent terminals, but that could be set up by the user.
It's the most customizable way I can think of, but since the default for terminals is a solid color, let's remember to put a note like "Remember to set the terminal background to transparent".

Edit: drawing on notebooks doesn't make sense, just draw on the window

@Vulcalien
Copy link
Member

White we are at it, the code for image stretch is in terminal.py:1126

xratio = float(rect.width) / float(self.background_image.get_width())
yratio = float(rect.height) / float(self.background_image.get_height())

Shouldn't be too hard to make a setting to calculate xratio and yratio in different ways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants