hyprcursor icon indicating copy to clipboard operation
hyprcursor copied to clipboard

Cursor goes to largest size when using fractional scaling and png cursors

Open Yohannnn opened this issue 1 year ago • 10 comments

I tried to extract a cursor png theme however when I set my cursor size to 24 the cursor was massive. I noticed that when I switched from my normal scale of 1.6 to 1 the cursor size went back to normal. It seems like it's just defaulting to the largest cursor size when using fractional scaling.

Yohannnn avatar Mar 24 '24 06:03 Yohannnn

can you try compiling and using the test to render a cursor at 24 * 2 (aka 48) and seeing if it turns out "massive"?

vaxerski avatar Mar 24 '24 15:03 vaxerski

When I switch to using a scale of 2 instead of 1.6 the cursor is the correct size.

Yohannnn avatar Mar 24 '24 15:03 Yohannnn

that does not answer my question

vaxerski avatar Mar 25 '24 01:03 vaxerski

Sorry, I misunderstood the question, setting the size to 48 with hyprctl still gives the same size cursor as 24. I've done some more testing and I've found some very weird behavior. Trying to use a size 1-9 results in a cursor slightly smaller than the xcursor which is using the theme that I extracted this hyprcursor theme from at a size of 24. Trying sizes 10-14 is decently bigger than the xcursor. 15 is smaller than the size from setting it to a size in 1-9. 16-19 is the same as 10-14. 20 Is the same as 1-9. 21-29 gives me the largest size ive seen so far. 30 is slightly larger than the xcursor. I'm not sure if there is a pattern here but either way this doesn't feel like it should be the correct behavior.

Yohannnn avatar Mar 25 '24 06:03 Yohannnn

what's the resampling setting on the cursor shapes?

vaxerski avatar Mar 25 '24 18:03 vaxerski

Hi, I have the same issue. I am using Adwaita theme from /usr/share/icons/Adwaita on Arch. My scale factor is set to 1.25 Idk what you mean by resampling setting but I tried all the algorithms. --resize none => huge size but sharp --resize nearest => right size but pixelated --resize bilinear => right size but blurry

ondrani avatar Mar 30 '24 00:03 ondrani

that's expected for png cursors. Use an svg theme for the right size without any pixelation/blur.

vaxerski avatar Mar 30 '24 17:03 vaxerski

@vaxerski I think this is what https://github.com/hyprwm/Hyprland/issues/6017 is referring to

Agent00Ming avatar May 12 '24 13:05 Agent00Ming

Maybe this is the reason. https://github.com/hyprwm/Hyprland/issues/6017#issuecomment-2106240673

hdm9527 avatar May 12 '24 13:05 hdm9527

yea, needs a fix

vaxerski avatar May 13 '24 13:05 vaxerski