From: nerdopolis Date: Wed, 7 Aug 2024 20:22:00 +0000 (-0400) Subject: fade-throbber: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1297059357ca93aab58d3087ff10dde9172bd234;p=thirdparty%2Fplymouth.git fade-throbber: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor --- diff --git a/src/plugins/splash/fade-throbber/plugin.c b/src/plugins/splash/fade-throbber/plugin.c index f22dc651..17c4e25a 100644 --- a/src/plugins/splash/fade-throbber/plugin.c +++ b/src/plugins/splash/fade-throbber/plugin.c @@ -113,7 +113,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); @@ -259,8 +259,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, "fade-throbber", "ConsoleViewerPreserveBackground"); + plugin->console_background_color = + ply_key_file_get_long (key_file, "fade-throbber", + "ConsoleLogBackgroundColor", + 0x00000000); plugin->image_dir = image_dir; @@ -738,13 +740,12 @@ draw_background (view_t *view, plugin = view->plugin; - if (plugin->should_show_console_messages && plugin->console_viewer_preserve_background == false) { - ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, 0); - } else { - ply_pixel_buffer_fill_with_gradient (pixel_buffer, &area, - PLYMOUTH_BACKGROUND_START_COLOR, - PLYMOUTH_BACKGROUND_END_COLOR); - } + ply_pixel_buffer_fill_with_gradient (pixel_buffer, &area, + PLYMOUTH_BACKGROUND_START_COLOR, + PLYMOUTH_BACKGROUND_END_COLOR); + + if (plugin->should_show_console_messages) + ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, plugin->console_background_color); } static void diff --git a/themes/fade-in/fade-in.plymouth.in b/themes/fade-in/fade-in.plymouth.in index a2a0d4bc..0a67ca35 100644 --- a/themes/fade-in/fade-in.plymouth.in +++ b/themes/fade-in/fade-in.plymouth.in @@ -5,4 +5,4 @@ ModuleName=fade-throbber [fade-throbber] ImageDir=@PLYMOUTH_THEME_PATH@/fade-in -ConsoleViewerPreserveBackground=false +ConsoleLogBackgroundColor=0x00000000