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 not centered on multiple monitors #42

Open
gop3k opened this issue Oct 10, 2023 · 3 comments
Open

Animation not centered on multiple monitors #42

gop3k opened this issue Oct 10, 2023 · 3 comments

Comments

@gop3k
Copy link

gop3k commented Oct 10, 2023

I'm a Linux Mint 21.2 Cinnamon Edition user, and I've been using your Plymouth theme 'colorful_sliced'. I recently encountered an issue where the theme displays with an offset across both screens on my dual-screen setup.

After extensive research and experimentation, I managed to find a workaround by replacing "Window.GetX()" with "Window.GetX(0)" and "Window.GetY()" with "Window.GetY(0)"in the theme's script (lines 36 and 37), which centers the animation on both screens.

However, I'm keen to understand more about the values for functions like 'Window.GetX()' and 'Window.GetY()' used in Plymouth scripts. The official documentation lacks specific details, and online searches haven't provided clarity.

I'd appreciate your insights and if possible, testing this solution on your system.

Thank you for your contributions to the open-source community.

@IPlayZed
Copy link

When using a custom theme from here for multiple monitors it is not applied only to the main one in my case. On shutdown this doesn't happen. Also, hot-plugging causes the animation to crash.

@IPlayZed
Copy link

Probably this is linked to #36.

@Glich440
Copy link

In my case changing

flyingman_sprite.SetX(Window.GetX() + (Window.GetWidth(0) / 2 - flyingman_image[0].GetWidth() / 2)); # Place images in the center
flyingman_sprite.SetY(Window.GetY() + (Window.GetHeight(0) / 2 - flyingman_image[0].GetHeight() / 2));

to

flyingman_sprite.SetX(Window.GetX() + (Window.GetWidth(1) / 2 - flyingman_image[0].GetWidth() / 2)); # Place images in the center
flyingman_sprite.SetY(Window.GetY() + (Window.GetHeight(1) / 2 - flyingman_image[0].GetHeight() / 2));

in the script file fixes it

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

3 participants