From: nerdopolis Date: Wed, 7 Aug 2024 20:21:24 +0000 (-0400) Subject: two-step: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5f7b7c60f94f8f9eceb1581184d5d784c150f27;p=thirdparty%2Fplymouth.git two-step: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor --- diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index 29fb93b7..61f136c2 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -201,7 +201,7 @@ struct _ply_boot_splash_plugin uint32_t should_show_console_messages : 1; ply_buffer_t *boot_buffer; uint32_t console_text_color; - uint32_t console_viewer_preserve_background; + uint32_t console_background_color; }; ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void); @@ -1290,8 +1290,10 @@ create_plugin (ply_key_file_t *key_file) "ConsoleLogTextColor", PLY_CONSOLE_VIEWER_LOG_TEXT_COLOR); - plugin->console_viewer_preserve_background = - ply_key_file_get_bool (key_file, "two-step", "ConsoleViewerPreserveBackground"); + plugin->console_background_color = + ply_key_file_get_long (key_file, "two-step", + "ConsoleLogBackgroundColor", + 0x00000000); plugin->transition_duration = ply_key_file_get_double (key_file, "two-step", @@ -1620,7 +1622,7 @@ draw_background (view_t *view, using_fw_background && plugin->dialog_clears_firmware_background) use_black_background = true; - if (plugin->should_show_console_messages && plugin->console_viewer_preserve_background == false) { + if (plugin->should_show_console_messages && plugin->console_background_color == 0x00000000) { use_black_background = true; } @@ -1636,8 +1638,10 @@ draw_background (view_t *view, ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, plugin->background_start_color); - if (plugin->should_show_console_messages) + if (plugin->should_show_console_messages && use_black_background == false) { + ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, plugin->console_background_color); return; + } if (plugin->watermark_image != NULL) { uint32_t *data; diff --git a/themes/spinfinity/spinfinity.plymouth.in b/themes/spinfinity/spinfinity.plymouth.in index 8f2eb8fa..b9b7f4d8 100644 --- a/themes/spinfinity/spinfinity.plymouth.in +++ b/themes/spinfinity/spinfinity.plymouth.in @@ -5,7 +5,7 @@ ModuleName=two-step [two-step] ScaleBackgroundImage=false -ConsoleViewerPreserveBackground=false +ConsoleLogBackgroundColor=0x00000000 ImageDir=@PLYMOUTH_THEME_PATH@/spinfinity BackgroundStartColor=0x0073b3 BackgroundEndColor=0x00457e