diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index e1499b2c..bc52873a 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -93,6 +93,9 @@ struct _ply_boot_splash_plugin double animation_vertical_alignment; char *animation_dir; + uint32_t background_start_color; + uint32_t background_end_color; + ply_trigger_t *idle_trigger; uint32_t root_is_mounted : 1; @@ -110,6 +113,7 @@ create_plugin (ply_key_file_t *key_file) ply_boot_splash_plugin_t *plugin; char *image_dir, *image_path; char *alignment; + char *color; srand ((int) ply_get_timestamp ()); plugin = calloc (1, sizeof (ply_boot_splash_plugin_t)); @@ -142,6 +146,24 @@ create_plugin (ply_key_file_t *key_file) plugin->animation_vertical_alignment = .5; free (alignment); + color = ply_key_file_get_value (key_file, "two-step", "BackgroundStartColor"); + + if (color != NULL) + plugin->background_start_color = strtol (color, NULL, 0); + else + plugin->background_start_color = PLYMOUTH_BACKGROUND_START_COLOR; + + free (color); + + color = ply_key_file_get_value (key_file, "two-step", "BackgroundEndColor"); + + if (color != NULL) + plugin->background_end_color = strtol (color, NULL, 0); + else + plugin->background_end_color = PLYMOUTH_BACKGROUND_END_COLOR; + + free (color); + return plugin; } @@ -349,9 +371,13 @@ on_erase (ply_boot_splash_plugin_t *plugin, area.width = width; area.height = height; - ply_frame_buffer_fill_with_gradient (plugin->frame_buffer, &area, - PLYMOUTH_BACKGROUND_START_COLOR, - PLYMOUTH_BACKGROUND_END_COLOR); + if (plugin->background_start_color != plugin->background_end_color) + ply_frame_buffer_fill_with_gradient (plugin->frame_buffer, &area, + plugin->background_start_color, + plugin->background_end_color); + else + ply_frame_buffer_fill_with_hex_color (plugin->frame_buffer, &area, + plugin->background_start_color); } static void