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

Background color not covering entire background image #3933

Closed
codedbyjordan opened this issue Aug 15, 2021 · 15 comments
Closed

Background color not covering entire background image #3933

codedbyjordan opened this issue Aug 15, 2021 · 15 comments
Labels

Comments

@codedbyjordan
Copy link

Describe the bug
The background color seems to have extra padding that is preventing it from covering the entire background image

To Reproduce
Steps to reproduce the behavior:

  1. Set background image
  2. Set background color
  3. Set background image layout to scaled, and set background tint and background opacity
  4. See error

Screenshots
image

Environment details

kitty 0.22.2 created by Kovid Goyal
Linux jordan-manjaro 5.10.56-1-MANJARO #1 SMP PREEMPT Thu Aug 5 10:51:27 UTC 2021 x86_64
Manjaro Linux \r  (\n) (\l)
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.1.0
DISTRIB_CODENAME=Pahvo
DISTRIB_DESCRIPTION="Manjaro Linux"
Running under:Wayland
Loaded config files:
  /home/jords/.config/kitty/kitty.conf

Config options different from defaults:
background_image        /usr/share/img/treefrog.png
background_image_layout scaled
background_tint         0.7
Added shortcuts:
	f1 KeyAction('launch')
@kovidgoyal
Copy link
Owner

That will happen when the OS window size is not an exact multiple of
cell size.

@HARSH-SHETH
Copy link

HARSH-SHETH commented Mar 12, 2022

That will happen when the OS window size is not an exact multiple of cell size.

Hi, what setting should I change to avoid this ?

@CastixGitHub
Copy link

Hello, can this be reopened?
it is window_padding_width because setting an higher value will accentuate it.
and playing with placement_strategy moves the padding around.
It is clear that the padding is required. but it should also inherit the opacity tint

@kovidgoyal
Copy link
Owner

Not something I care about, patches are welcome.

@Asday
Copy link

Asday commented Jul 26, 2022

Agree that this is really budget, but the workaround is easy enough - tint the image yourself and remove the tint from the options. In Krita, open your image, make a new layer above it, fill it with your Kitty background colour, then set the opacity to whatever your tint value was (multiplied by a hundred), then save the image out. It's worth keeping the Krita file around too for changing the background tint colour or opacity.

Also really easy to do in Photoshop, blender, and I imagine the particularly motivated could do it in GIMP.

@patrykk21
Copy link

patrykk21 commented Sep 27, 2022

I'd like to tackle this problem, @kovidgoyal .

Could you suggest me where to start looking? I've never worked on this project. Seems fairly big.

EDIT: I think I got it... will have to install dependencies and test it out.

@CastixGitHub
Copy link

@patrykk21
each cell (character) have their own background tint, so the area outside (padding) cannot be colored out that way.
You can instead use Pillow to manipulate the background image as suggested by Asday

@patrykk21
Copy link

@patrykk21 each cell (character) have their own background tint, so the area outside (padding) cannot be colored out that way. You can instead use Pillow to manipulate the background image as suggested by Asday

Not really... by applying a manual backdrop you incur into issues when resizing/zooming and stuff.
I'm not into losing pixel quality ~ :(

@Asday
Copy link

Asday commented Oct 3, 2022

cannot be colored out that way

Sure but Patrykk's intent is to change the source code such that the padding can be tinted, rather than to just set his own background. It doesn't matter if the way the code currently does stuff is inadequate because it's that inadequacy he aims to fix.

@kovidgoyal kovidgoyal reopened this Oct 3, 2022
@Asday
Copy link

Asday commented Oct 3, 2022

Ooh that's awesome! I'll try it out when it downstreams, thanks Kovid my dude.

@patrykk21
Copy link

You're awesome. I'm crying of joy. I'll finally be able to have my anime girls holding programming books in the background like a real nerd should.

Just waiting for the homebrew build to finish and I'm testing it!

@kovidgoyal
Copy link
Owner

Enjoy. I haven't tested it very much and that too only in Linux, but
hopefully it works.

@Asday
Copy link

Asday commented Oct 3, 2022

Linux is all that matters anyway :)

I'll poke in thread if there's an issue but I don't imagine one of course.

@patrykk21
Copy link

HURRAY

@patrykk21
Copy link

Thank you!!!

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

No branches or pull requests

6 participants