diff --git a/debian/changelog b/debian/changelog index 4ae7cfb..2f8ce3a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +desktop-base (12.0.3) UNRELEASED; urgency=medium + + * Update plymouth theme to implement Juliette’s proposal. + + -- Aurélien COUDERC Fri, 10 Feb 2023 23:38:10 +0100 + desktop-base (12.0.2) unstable; urgency=medium * Fix emerald theme paths in desktop xml file (Closes: #1026264) diff --git a/emerald-theme/plymouth/Emerald_plymouth.svg b/emerald-theme/plymouth/Emerald_plymouth.svg new file mode 100644 index 0000000..5d4e857 --- /dev/null +++ b/emerald-theme/plymouth/Emerald_plymouth.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/emerald-theme/plymouth/emerald.script b/emerald-theme/plymouth/emerald.script index 9da1a3e..ac5becd 100644 --- a/emerald-theme/plymouth/emerald.script +++ b/emerald-theme/plymouth/emerald.script @@ -27,15 +27,14 @@ #------------------------------- Constants ----------------------------------------- -NB_ROTATION_STEPS = 70; -NB_REFRESHS_BETWEEN_ANIMS = 3; +NB_ANIM_STEPS = 70; +NB_REFRESHS_BETWEEN_ANIMS = 1; # Initial position of the center of the logo in % of background -DEBIAN_POS_PCT.y = 0.68; # Debian image position in % of screen height -DEBIAN_HEIGHT_PCT = 0.07; # Debian image height in % of smallest screen dimension LOGO_CENTER_PCT.x = 0.5; # Debian swirl image position in % of screen height & width -LOGO_CENTER_PCT.y = 0.5; -LOGO_SIZE_PCT = 0.18; # Debian swirl image size in % of smallest screen dimension +LOGO_CENTER_PCT.y = 0.55; +LOGO_SIZE_PCT = 0.48; # Debian + emerald image size in % of smallest screen dimension +LOGO_GLOW_SIZE_PCT = 0.4; # Debian swirl image size in % of smallest screen dimension #------------------------------- Globals ------------------------------------------- # are we currently prompting for a password? @@ -115,11 +114,12 @@ fun TextYOffset() { local.min_height; # Put the 1st line below the logo + some spacing - y = debian_sprite.GetY() + debian.GetHeight(); + # TODO position from lower edge + y = logo_sprite.GetY() + logo.GetHeight(); #Debug("y = " + y); text_height = first_line_height * 7.5; - min_height = window_max.height; + min_height = window_max.height - 2 * first_line_height; #Debug("text_height=" + text_height + "; min_height=" + min_height); if (y + text_height > min_height) @@ -138,55 +138,39 @@ small_dimension = Math.Min(window_max.width, window_max.height); #Debug("Window.GetX():" + Window.GetX() + ", Window.GetY():" + Window.GetY()); #Debug("Window is [" + window_max.width + ";" + window_max.height + "], ratio=" + screen_ratio); -debian_height = small_dimension * DEBIAN_HEIGHT_PCT; -debian_pos.y = window_max.height * DEBIAN_POS_PCT.y - debian_height/2; logo_size = small_dimension * LOGO_SIZE_PCT; logo_center.x = window_max.width * LOGO_CENTER_PCT.x; logo_center.y = window_max.height * LOGO_CENTER_PCT.y; #Debug("Logo center at [" + logo_center.x + ";" + logo_center.y + "], size=" + logo_size + "px"); -logo_pos.x = logo_center.x - logo_size/2; +logo_pos.x = logo_center.x - 0.343 * logo_size; # Center the Debian 12 text, not the image logo_pos.y = logo_center.y - logo_size/2; -#------------------------------- Background ---------------------------------------- -bg_image = Image("plymouth_background.png"); -scaled_bg_image = bg_image.Scale(window_max.width, window_max.height); +logo_glow_size = small_dimension * LOGO_GLOW_SIZE_PCT; -# Display background -bg_sprite = Sprite(scaled_bg_image); -bg_sprite.SetPosition(Window.GetX() + Window.GetWidth() / 2 - scaled_bg_image.GetWidth() / 2, - Window.GetY() + Window.GetHeight() / 2 - scaled_bg_image.GetHeight() / 2, - -1000); -#------------------------------- Debian ---------------------------------------------- -debian = Image("debian.png"); -# Target same height as logo -debian_scale_factor = debian_height / debian.GetHeight(); -debian = debian.Scale(debian.GetWidth() * debian_scale_factor, - debian.GetHeight() * debian_scale_factor); -debian_sprite = Sprite(debian); -debian_sprite.SetPosition(window_max.width / 2 - debian.GetWidth() / 2, - debian_pos.y, - -90); - -#------------------------------- Logo ---------------------------------------------- -logo = Image("logo.png"); +#---------------------------- Logo + Emerald --------------------------------- +logo = Image("logo+emerald.png"); logo_scale_factor = logo_size / logo.GetWidth(); logo = logo.Scale(logo.GetWidth() * logo_scale_factor, logo.GetHeight() * logo_scale_factor); logo_to_top_edge = Window.GetHeight() * 0.3; logo_sprite = Sprite(logo); -logo_sprite.SetPosition(logo_pos.x, logo_pos.y, -50); +logo_sprite.SetPosition(logo_pos.x, logo_pos.y, -1); +#logo_sprite.SetOpacity(0); - -logo_glow = Image("logo_circle.png"); -logo_glow_scale_factor = logo_size / logo_glow.GetWidth(); -logo_glow[0] = logo_glow.Scale(logo_glow.GetWidth() * logo_glow_scale_factor, +logo_glow = Image("glow.png"); +logo_glow_scale_factor = logo_glow_size / logo_glow.GetWidth(); +logo_glow = logo_glow.Scale(logo_glow.GetWidth() * logo_glow_scale_factor, logo_glow.GetHeight() * logo_glow_scale_factor); -logo_glow_sprite = Sprite(); -logo_glow_sprite.SetPosition(logo_pos.x, logo_pos.y, -60); -logo_glow_sprite.SetImage(logo_glow[0]); +logo_glow_pos.x = logo_center.x - logo_glow.GetWidth() / 2; +# Place glow vertically between the Debian 12 text and the emerald +logo_glow_pos.y = logo_pos.y + logo.GetHeight()*0.1 - logo_glow.GetHeight() / 2; + +logo_glow_sprite = Sprite(); +logo_glow_sprite.SetPosition(logo_glow_pos.x, logo_glow_pos.y, -2); +logo_glow_sprite.SetImage(logo_glow); #------------------------------String functions------------------------------- @@ -248,12 +232,12 @@ fun StringToInteger (str) { #----------------------------------------------------------------------------- # Top background colour -# #010027 --> 0.004, 0.0, 0.153 +# #05475c --> 0.0196, 0.2784, 0.3608 # Bottom background colour -# #010027 --> 0.004, 0.0, 0.153 +# #05475c --> 0.0196, 0.2784, 0.3608 # -Window.SetBackgroundTopColor (0.004, 0.0, 0.153); # Nice colour on top of the screen fading to -Window.SetBackgroundBottomColor (0.004, 0.0, 0.153); # an equally nice colour on the bottom +Window.SetBackgroundTopColor (0.02, 0.279, 0.3608); # Nice colour on top of the screen fading to +Window.SetBackgroundBottomColor (0.02, 0.279, 0.3608); # an equally nice colour on the bottom bits_per_pixel = Window.GetBitsPerPixel (); # TODO need to handle 16 colors ? @@ -984,6 +968,12 @@ fun rotate_img(source_img, current_step, nb_steps) { } fun update_glow_anim () { + if (global.anim_iter > NB_ANIM_STEPS) { + global.anim_iter = 0; + } + #DebugMedium("iter = " + global.anim_iter); + glow_opacity = 0.6 + 0.4 * Math.Cos(global.anim_iter / NB_ANIM_STEPS * 2 * Math.Pi); + #Debug("glow_opacity = " + glow_opacity); if (global.anim_start_time != global.progress_time && global.anim_status != "running") { global.anim_start_time = global.progress_time; global.anim_iter = 0; @@ -991,17 +981,17 @@ fun update_glow_anim () { } if (global.anim_status == "running") { - iter_img = global.logo_glow[global.anim_iter]; - if (iter_img == NULL) { - # Generate rotated image for the glow around the logo on demand. - #DebugMedium("Generating rotated image for index " + global.anim_iter); - iter_img = rotate_img(logo_glow[0], global.anim_iter, NB_ROTATION_STEPS); - global.logo_glow[global.anim_iter] = iter_img; - } - global.logo_glow_sprite.SetImage(iter_img); +# iter_img = global.logo_glow[global.anim_iter]; +# if (iter_img == NULL) { +# # Generate rotated image for the glow around the logo on demand. +# #DebugMedium("Generating rotated image for index " + global.anim_iter); +# #iter_img = rotate_img(logo_glow[0], global.anim_iter, NB_ANIM_STEPS); +# global.logo_glow[global.anim_iter] = iter_img; +# } + global.logo_glow_sprite.SetOpacity(glow_opacity); global.anim_iter++; - if (global.anim_iter >= NB_ROTATION_STEPS) { + if (global.anim_iter >= NB_ANIM_STEPS) { global.anim_status = "stopped"; } } diff --git a/emerald-theme/plymouth/glow.png b/emerald-theme/plymouth/glow.png new file mode 100644 index 0000000..697e3bc Binary files /dev/null and b/emerald-theme/plymouth/glow.png differ diff --git a/emerald-theme/plymouth/glow.xcf b/emerald-theme/plymouth/glow.xcf new file mode 100644 index 0000000..f2d226c Binary files /dev/null and b/emerald-theme/plymouth/glow.xcf differ diff --git a/emerald-theme/plymouth/logo+emerald.png b/emerald-theme/plymouth/logo+emerald.png new file mode 100644 index 0000000..c231913 Binary files /dev/null and b/emerald-theme/plymouth/logo+emerald.png differ diff --git a/emerald-theme/plymouth/logo+emerald.svg b/emerald-theme/plymouth/logo+emerald.svg new file mode 100644 index 0000000..a0e32af --- /dev/null +++ b/emerald-theme/plymouth/logo+emerald.svg @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/emerald-theme/plymouth/logo.png b/emerald-theme/plymouth/logo.png deleted file mode 100644 index b207046..0000000 Binary files a/emerald-theme/plymouth/logo.png and /dev/null differ diff --git a/emerald-theme/plymouth/logo_circle.png b/emerald-theme/plymouth/logo_circle.png deleted file mode 100644 index ed3bf4b..0000000 Binary files a/emerald-theme/plymouth/logo_circle.png and /dev/null differ diff --git a/emerald-theme/plymouth/password_field.png b/emerald-theme/plymouth/password_field.png index 6afe1f5..b837f1b 100644 Binary files a/emerald-theme/plymouth/password_field.png and b/emerald-theme/plymouth/password_field.png differ diff --git a/emerald-theme/plymouth/plymouth_background.png b/emerald-theme/plymouth/plymouth_background.png deleted file mode 100644 index fff21c4..0000000 Binary files a/emerald-theme/plymouth/plymouth_background.png and /dev/null differ