danyspin97 / wpaperd

Modern wallpaper daemon for Wayland
GNU General Public License v3.0
332 stars 26 forks source link

Wallpaper modes "center" and "tile" not working as expected #69

Closed Rolv-Apneseth closed 5 months ago

Rolv-Apneseth commented 5 months ago

Hey @danyspin97, just having an issue with the latest changes and was wondering if you knew why. I'm seeing unexpected behaviour from the wallpaper modes, which I'll show with 2 images (1 and 2).

I usually leave the mode as center as I want it to cover the whole screen but keep the aspect ratio, but it seems to be tiling for "wide" images:

Using mode="tile"

tile_water tile_wheat

Using mode="center"

center_water center_wheat

danyspin97 commented 5 months ago

Hey @Rolv-Apneseth, thank you for the issue. Yea, with the updates for the transitions, I had to change a bit the way that the wallpapers are drawn. Well... I was using pictures that which ratio was the same as my display and didn't notice the issues. I am already working on it since last week, I'll try to finish the fix by tomorrow (I am already halfway through it).

Nice bonus of the new way of drawing, transitions will work with fit mode.

Rolv-Apneseth commented 5 months ago

Awesome, thank you

danyspin97 commented 5 months ago

In 0082898564dbcee1330237b914edf7d883dd81ec, modes Center and Fit (but the latter requires more testing) have been fixed. Tile is still broken, as I am trying to find the right equation to get the proportions of the image. Fit transitions have been overhauled and the code used for drawing is way simpler.

Rolv-Apneseth commented 5 months ago

That's great, thanks. Center looks good to me:

fixed


Is fit supposed to distort images though? Probably causing a lot of issues with my wallpaper images being all sorts of different sizes haha

Fit

fit

Center

center

danyspin97 commented 5 months ago

That's definitely not normal xD Yea, probably that was a size I haven't tried yet. I'll refine the calculation for Fit and Tile as soon as possible, it will probably take a couple of days.

Rolv-Apneseth commented 5 months ago

No worries, I only use center haha. Here is that image if it helps.

danyspin97 commented 5 months ago

I finally managed to fix all modes! I have also tested the image you shared, and it should be working now!

Fixed by 86d8fb9f7e9bcca3bd3197652901ce5f8a37ecbe.

Rolv-Apneseth commented 5 months ago

Nice, most of them are working perfectly now. However, with the latest changes, I did find an image that is still getting stretched by tile (this one):

Center

center

Fit

fit

Tile

tile

Edit: It's not just the one image, I do have multiple that get stretched if you need more examples

danyspin97 commented 5 months ago

Right, that's definitely stretched xD cf662e5 should hopefully be the last fix!

Rolv-Apneseth commented 5 months ago

All looks great now, thank you