fix(plymouth): keep logo centered during luks unlock, entry appears below it
- commit
- 2387784d5744aa7b769f093d370184700f37d97b
- author
- brice · · 2026-02-28 06:36 UTC
- parent
- 122ee1b
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +5 -14
M assets/plymouth/archup.script +5 -14
| @@ -140,17 +140,9 @@ entry.scaled_image = entry.image.Scale( | |||
| 140 | 140 | Math.Int(entry.image.GetHeight() * 0.6) | |
| 141 | 141 | ); | |
| 142 | 142 | ||
| 143 | - | # Gap between logo bottom and entry top when password dialog is shown | |
| 144 | - | dialog_gap = 40; | |
| 145 | - | ||
| 146 | - | # Total height of logo + gap + entry when grouped for password dialog | |
| 147 | - | dialog_group_height = logo.image.GetHeight() + dialog_gap + entry.scaled_image.GetHeight(); | |
| 148 | - | ||
| 149 | - | # Vertical start so the group is centered on screen | |
| 150 | - | dialog_group_y = Window.GetHeight() / 2 - dialog_group_height / 2; | |
| 151 | - | ||
| 152 | - | # Entry sits below the logo in password mode | |
| 153 | - | entry.dialog_y = dialog_group_y + logo.image.GetHeight() + dialog_gap; | |
| 143 | + | # Entry appears below the centered logo with a fixed gap | |
| 144 | + | dialog_gap = 32; | |
| 145 | + | entry.dialog_y = logo.normal_y + logo.image.GetHeight() + dialog_gap; | |
| 154 | 146 | entry.x = Window.GetWidth() / 2 - entry.scaled_image.GetWidth() / 2; | |
| 155 | 147 | ||
| 156 | 148 | entry.sprite = Sprite(entry.scaled_image); | |
| @@ -182,9 +174,8 @@ fun display_password_callback (prompt, bullets) | |||
| 182 | 174 | { | |
| 183 | 175 | global.password_shown = 1; # Mark that password dialog has been shown | |
| 184 | 176 | ||
| 185 | - | # Move logo up so logo + entry are centered together as a group | |
| 186 | - | logo_dialog_y = dialog_group_y; | |
| 187 | - | logo.sprite.SetPosition(logo.normal_x, logo_dialog_y, 1); | |
| 177 | + | # Keep logo at its normal centered position during unlock | |
| 178 | + | logo.sprite.SetPosition(logo.normal_x, logo.normal_y, 1); | |
| 188 | 179 | ||
| 189 | 180 | # Reset progress when password dialog appears | |
| 190 | 181 | stop_fake_progress(); | |
| @@ -140,17 +140,9 @@ entry.scaled_image = entry.image.Scale( | |||||
| 140 | Math.Int(entry.image.GetHeight() * 0.6) | 140 | Math.Int(entry.image.GetHeight() * 0.6) | ||
| 141 | ); | 141 | ); | ||
| 142 | 142 | ||||
| 143 | - | # Gap between logo bottom and entry top when password dialog is shown | 143 | + | # Entry appears below the centered logo with a fixed gap |
| 144 | - | dialog_gap = 40; | 144 | + | dialog_gap = 32; |
| 145 | - | 145 | + | entry.dialog_y = logo.normal_y + logo.image.GetHeight() + dialog_gap; | |
| 146 | - | # Total height of logo + gap + entry when grouped for password dialog | |||
| 147 | - | dialog_group_height = logo.image.GetHeight() + dialog_gap + entry.scaled_image.GetHeight(); | |||
| 148 | - | ||||
| 149 | - | # Vertical start so the group is centered on screen | |||
| 150 | - | dialog_group_y = Window.GetHeight() / 2 - dialog_group_height / 2; | |||
| 151 | - | ||||
| 152 | - | # Entry sits below the logo in password mode | |||
| 153 | - | entry.dialog_y = dialog_group_y + logo.image.GetHeight() + dialog_gap; | |||
| 154 | entry.x = Window.GetWidth() / 2 - entry.scaled_image.GetWidth() / 2; | 146 | entry.x = Window.GetWidth() / 2 - entry.scaled_image.GetWidth() / 2; | ||
| 155 | 147 | ||||
| 156 | entry.sprite = Sprite(entry.scaled_image); | 148 | entry.sprite = Sprite(entry.scaled_image); | ||
| @@ -182,9 +174,8 @@ fun display_password_callback (prompt, bullets) | |||||
| 182 | { | 174 | { | ||
| 183 | global.password_shown = 1; # Mark that password dialog has been shown | 175 | global.password_shown = 1; # Mark that password dialog has been shown | ||
| 184 | 176 | ||||
| 185 | - | # Move logo up so logo + entry are centered together as a group | 177 | + | # Keep logo at its normal centered position during unlock |
| 186 | - | logo_dialog_y = dialog_group_y; | 178 | + | logo.sprite.SetPosition(logo.normal_x, logo.normal_y, 1); |
| 187 | - | logo.sprite.SetPosition(logo.normal_x, logo_dialog_y, 1); | |||
| 188 | 179 | ||||
| 189 | # Reset progress when password dialog appears | 180 | # Reset progress when password dialog appears | ||
| 190 | stop_fake_progress(); | 181 | stop_fake_progress(); | ||