sway-borders icon indicating copy to clipboard operation
sway-borders copied to clipboard

Shifted outer borders

Open EysseW opened this issue 3 years ago • 8 comments

So I am fiddling around with shadows ATM, but I wanna shift them. A might be stupid, but I am pretty sure there is no way to shift them, like actual shadows probably would. I would like to see this added.

EysseW avatar Jun 04 '22 13:06 EysseW

If by shift you mean have them larger on one side than another, you still have to use a square image but you can have transparent pixels on the opposite side instead of a shadow.

fluix-dev avatar Jun 04 '22 21:06 fluix-dev

I forgot the reply, I am sorry. No, by shifted I mean as in off center. So it mean the corner has to be shifted as well, and I don't think that is possible at the moment. The corner should thus move with it. It's going to look wonky otherwise. Unfortuneatly, I can't really show what I mean with images since I don't have good reference images.

EysseW avatar Jun 08 '22 19:06 EysseW

image

Here's a little example shadow I made with only the right under shadow present. The corners are straight, but I want them to be shifted along with the rest fo the shadow.

EysseW avatar Jun 08 '22 19:06 EysseW

Ah, I understand. I think what you're trying to achieve may work given some border thickness that could exist at the corners, but if you want just shadow then yes, you would need some offset which doesn't currently exist.

As with many of the other border-related requests, I'm planning on reworking the entire system to use shaders but I'm not sure when I'll get around to getting that fully functional. Alternatively, you can try looking at render_border_textures inside of sway/desktop/render.c too add some offsets and such.

fluix-dev avatar Jun 09 '22 23:06 fluix-dev

Alright. Thanks!

EysseW avatar Jun 09 '22 23:06 EysseW

Looking back at this thread, with that last sentence you were trying to say: "Try coding the thing yourself", right? Or am I missing something here and would it be very easy to fix this myself?

EysseW avatar Jun 23 '22 23:06 EysseW

"Try coding the thing yourself"

At least for now, yes :)

fluix-dev avatar Jun 24 '22 01:06 fluix-dev

Totally reasonable, just curious. Thanks for the amazing project man!

EysseW avatar Jun 26 '22 22:06 EysseW