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

Animation crops right and bottom borders #1264

Closed
jdujava opened this issue May 20, 2024 · 1 comment
Closed

Animation crops right and bottom borders #1264

jdujava opened this issue May 20, 2024 · 1 comment

Comments

@jdujava
Copy link

jdujava commented May 20, 2024

I am trying out slight modification of "appear/disappear" animation #1253 (comment):

Animation configuration
animations = ({
    triggers = ["close", "hide"];
    opacity = {
        timing = "0.2s linear";
        start = "window-raw-opacity-before";
        end = "window-raw-opacity";
    };
    blur-opacity = "opacity";
    shadow-opacity = "opacity";
    offset-x = "(1 - scale-x) / 2 * window-width";
    offset-y = "(1 - scale-y) / 2 * window-height";
    scale-x = {
        timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
        start = 1;
        end = 0.54;
    };
    scale-y = "scale-x";
    shadow-scale-x = "scale-x";
    shadow-scale-y = "scale-y";
    shadow-offset-x = "offset-x";
    shadow-offset-y = "offset-y";
},
{
    triggers = ["open", "show"];
    opacity = {
        timing = "0.2s linear";
        start = "window-raw-opacity-before";
        end = "window-raw-opacity";
    };
    blur-opacity = "opacity";
    shadow-opacity = "opacity";
    offset-x = "(1 - scale-x) / 2 * window-width";
    offset-y = "(1 - scale-y) / 2 * window-height";
    scale-x = {
        timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
        start = 0.92;
        end = 1;
    };
    scale-y = "scale-x";
    shadow-scale-x = "scale-x";
    shadow-scale-y = "scale-y";
    shadow-offset-x = "offset-x";
    shadow-offset-y = "offset-y";
})

Almost everything seems to work well, but I noticed that while top/bottom borders are visible through all animation, right/bottom borders are cropped out. Best to view the following slowed down video:

animation_slowed.mp4

Is there a way how to avoid this behavior via animation configuration, or perhaps in some other way?

@yshui
Copy link
Owner

yshui commented May 20, 2024

nope, this is a bug.

I think something is wrong in corner radius calculation (although you didn't enable it). the xrender backend does not have this problem until I set a corner radius.

yshui added a commit that referenced this issue May 21, 2024
And fixes inconsistencies when setting these arguments with a scaling
factor.

Fixes #1264

Signed-off-by: Yuxuan Shui <[email protected]>
@yshui yshui closed this as completed in ab5ee41 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants