diff --git a/src/rugby-possibility-widget.c b/src/rugby-possibility-widget.c index d1195b0a2aeb50f7497da7dfdcee687b12f15677..1c1db86967afd9b7c3f92de0d0808d0fe2dfb8db 100644 --- a/src/rugby-possibility-widget.c +++ b/src/rugby-possibility-widget.c @@ -80,10 +80,10 @@ rugby_possibility_widget_get_preferred_height (GtkWidget *widget, static void render_bar (cairo_t *cr, GtkStyleContext *context, - gint x, - gint y, - gint w, - gint h, + gdouble x, + gdouble y, + gdouble w, + gdouble h, const gchar *style) { gtk_style_context_save (context); @@ -98,9 +98,9 @@ rugby_possibility_widget_draw (GtkWidget *widget, { RugbyPossibilityWidget *self = RUGBY_POSSIBILITY_WIDGET (widget); - gint width = gtk_widget_get_allocated_width (widget); - gint height = gtk_widget_get_allocated_height (widget); - gint x = 0, y = 0; + gdouble width = gtk_widget_get_allocated_width (widget); + gdouble height = gtk_widget_get_allocated_height (widget); + gdouble x = 0.0, y = 0.0; GtkStyleContext *context = gtk_widget_get_style_context (widget); gtk_style_context_save (context); @@ -121,7 +121,7 @@ rugby_possibility_widget_draw (GtkWidget *widget, gtk_style_context_add_class (context, "fill-block"); // Tries - gint w = width / (score / 7.0); + gdouble w = width / (score / 7.0); for (int i = 0; i < tries; i++) { render_bar (cr, context, x, y, w, height, "score-try");