Skip to content

Commit

Permalink
Fix plymouth on multi-screens with different resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Jul 18, 2024
1 parent 9f7e8d1 commit 2148dce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plymouth/qubes-dark/qubes-dark.script
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ logo.sprite = Sprite(logo.image);
logo.opacity_angle = 0;

fun refresh_callback () {
# Reposition everything 50 times per second
# This is necessary on multi-monitor systems with different resolution
logo.sprite.SetX(Window.GetX() + (Window.GetWidth() - logo.image.GetWidth()) / 2);
logo.sprite.SetY(Window.GetY() + (Window.GetHeight() - logo.image.GetHeight()) / 2);
logo.sprite.SetOpacity(1);
if (global.dialog) {
global.dialog.prompt.sprite.SetX(logo.sprite.GetX() + (logo.image.GetWidth() - prompt.image.GetWidth()) / 2);
global.dialog.prompt.sprite.SetY(logo.sprite.GetY() + logo.image.GetHeight() + 16);
global.dialog.prompt.sprite.SetZ(1);
global.entry.sprite.SetX(prompt.sprite.GetX() + (prompt.image.GetWidth() - entry.image.GetWidth()) / 2);
global.entry.sprite.SetY(prompt.sprite.GetY() + prompt.image.GetHeight() + 16);
global.entry.sprite.SetZ(1);
}
}

Plymouth.SetRefreshFunction(refresh_callback);
Expand Down

0 comments on commit 2148dce

Please sign in to comment.