From: Ray Strode Date: Thu, 25 Sep 2008 21:48:10 +0000 (-0400) Subject: Make 3 text progress bars have parabolic relation X-Git-Tag: 0.6.0~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=700992202cb01ea73f3883ca7dccef83824e0fc6;p=thirdparty%2Fplymouth.git Make 3 text progress bars have parabolic relation Assocate the 3 progress bars using parabolic equations based on advice from Soeren. --- diff --git a/src/libplybootsplash/ply-text-progress-bar.c b/src/libplybootsplash/ply-text-progress-bar.c index 052a1c2a..04cb26c5 100644 --- a/src/libplybootsplash/ply-text-progress-bar.c +++ b/src/libplybootsplash/ply-text-progress-bar.c @@ -20,6 +20,7 @@ * Written by: Adam Jackson * Bill Nottingham * Ray Strode + * Soeren Sandmann */ #include "config.h" @@ -135,9 +136,9 @@ ply_text_progress_bar_draw (ply_text_progress_bar_t *progress_bar) progress_bar->column, progress_bar->row); - brown_fraction = progress_bar->percent_done; - blue_fraction = progress_bar->percent_done - (.2 * (1.0 - brown_fraction)) * brown_fraction; - white_fraction = progress_bar->percent_done - (1.0 - progress_bar->percent_done) * blue_fraction; + brown_fraction = - (progress_bar->percent_done * progress_bar->percent_done) + 2 * progress_bar->percent_done; + blue_fraction = progress_bar->percent_done; + white_fraction = progress_bar->percent_done * progress_bar->percent_done; for (i = 0; i < width; i++) { double f;