From e8195cb2a9b48578eabf781acdd105ee507f2a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Sep 2024 17:35:11 +0200 Subject: [PATCH] Fix wrong logo position on plymouth Do not add "window" position to the logo/progress position. On a single screen system, that position is always (0,0), but on multi-screen system it's a position of the output. It seems that plymouth calls relevant callbacks for each output ("window") separately, so there is no need to add window position manually. Fixes https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/205 --- plymouth/qubes-dark/qubes-dark.script | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plymouth/qubes-dark/qubes-dark.script b/plymouth/qubes-dark/qubes-dark.script index 84b8c6a..8619351 100644 --- a/plymouth/qubes-dark/qubes-dark.script +++ b/plymouth/qubes-dark/qubes-dark.script @@ -18,8 +18,8 @@ else } fun refresh_callback () { - logo.sprite.SetX(Window.GetX() + (Window.GetWidth() - logo.image.GetWidth()) / 2); - logo.sprite.SetY(Window.GetY() + (Window.GetHeight() - logo.image.GetHeight()) / 2); + logo.sprite.SetX((Window.GetWidth() - logo.image.GetWidth()) / 2); + logo.sprite.SetY((Window.GetHeight() - logo.image.GetHeight()) / 2); logo.sprite.SetOpacity(1); } @@ -182,7 +182,7 @@ Plymouth.SetDisplayPromptFunction(display_prompt_callback); progress_box.image = Image("progress_box.png"); progress_box.sprite = Sprite(progress_box.image); -progress_box.sprite.SetX(Window.GetX() + (Window.GetWidth() - progress_box.image.GetWidth()) / 2); +progress_box.sprite.SetX((Window.GetWidth() - progress_box.image.GetWidth()) / 2); progress_box.sprite.SetY(Window.GetHeight() - 50 - progress_box.image.GetHeight() / 2); progress_bar.original_image = Image("progress_bar.png");