<message>Delete obsolete one-shot scripts for setting screen rotation and wallpaper, as well as related Python and shell scripts. Update the first-boot configuration to streamline the provisioning process by removing references to these scripts. This cleanup enhances maintainability and focuses on the essential steps required for the first boot experience, ensuring a more efficient setup for users.
41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
screen_width = Window.GetWidth();
|
|
screen_height = Window.GetHeight();
|
|
|
|
theme_image = Image("splash.png");
|
|
image_width = theme_image.GetWidth();
|
|
image_height = theme_image.GetHeight();
|
|
|
|
scale_x = image_width / screen_width;
|
|
scale_y = image_height / screen_height;
|
|
|
|
if (scale_x > 1 || scale_y > 1)
|
|
{
|
|
if (scale_x > scale_y)
|
|
{
|
|
resized_image = theme_image.Scale(screen_width, image_height / scale_x);
|
|
image_x = 0;
|
|
image_y = (screen_height - ((image_height * screen_width) / image_width)) / 2;
|
|
}
|
|
else
|
|
{
|
|
resized_image = theme_image.Scale(image_width / scale_y, screen_height);
|
|
image_x = (screen_width - ((image_width * screen_height) / image_height)) / 2;
|
|
image_y = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
resized_image = theme_image.Scale(image_width, image_height);
|
|
image_x = (screen_width - image_width) / 2;
|
|
image_y = (screen_height - image_height) / 2;
|
|
}
|
|
|
|
if (Plymouth.GetMode() != "shutdown")
|
|
{
|
|
sprite = Sprite(resized_image);
|
|
sprite.SetPosition(image_x, image_y, -100);
|
|
}
|
|
|
|
fun message_callback(text) {
|
|
}
|