diff --git a/src/libply-splash-graphics/ply-progress-bar.c b/src/libply-splash-graphics/ply-progress-bar.c index e5697b46..369255af 100644 --- a/src/libply-splash-graphics/ply-progress-bar.c +++ b/src/libply-splash-graphics/ply-progress-bar.c @@ -51,10 +51,6 @@ #include "ply-image.h" #include "ply-utils.h" -#ifndef BAR_HEIGHT -#define BAR_HEIGHT 16 -#endif - struct _ply_progress_bar { ply_pixel_display_t *display; @@ -134,15 +130,17 @@ void ply_progress_bar_show (ply_progress_bar_t *progress_bar, ply_pixel_display_t *display, long x, - long y) + long y, + unsigned long width, + unsigned long height) { assert (progress_bar != NULL); progress_bar->display = display; progress_bar->area.x = x; progress_bar->area.y = y; - progress_bar->area.height = BAR_HEIGHT; - progress_bar->area.width = ply_pixel_display_get_width (display); + progress_bar->area.height = height; + progress_bar->area.width = width; progress_bar->is_hidden = false; ply_progress_bar_draw (progress_bar); diff --git a/src/libply-splash-graphics/ply-progress-bar.h b/src/libply-splash-graphics/ply-progress-bar.h index 1eab64c5..55f5a480 100644 --- a/src/libply-splash-graphics/ply-progress-bar.h +++ b/src/libply-splash-graphics/ply-progress-bar.h @@ -40,7 +40,9 @@ void ply_progress_bar_free (ply_progress_bar_t *bar); void ply_progress_bar_show (ply_progress_bar_t *bar, ply_pixel_display_t *display, long x, - long y); + long y, + unsigned long width, + unsigned long height); void ply_progress_bar_hide (ply_progress_bar_t *bar); void ply_progress_bar_draw (ply_progress_bar_t *bar); void ply_progress_bar_draw_area (ply_progress_bar_t *bar, diff --git a/src/plugins/splash/throbgress/plugin.c b/src/plugins/splash/throbgress/plugin.c index 4016d966..bbcf1b7c 100644 --- a/src/plugins/splash/throbgress/plugin.c +++ b/src/plugins/splash/throbgress/plugin.c @@ -316,7 +316,10 @@ view_start_animation (view_t *view) view->logo_area.y + view->logo_area.height + height / 2); ply_progress_bar_show (view->progress_bar, view->display, - 0, screen_height - ply_progress_bar_get_height (view->progress_bar)); + 0, + screen_height - BAR_HEIGHT, + screen_width, + BAR_HEIGHT); view_redraw (view); }