diff --git a/src/rugby-possibility-widget.c b/src/rugby-possibility-widget.c index 624088a0570ab9e2e5e9840c432167d891e63579..784d708f7dc71e1931f0e2886c9225bfde06ddae 100644 --- a/src/rugby-possibility-widget.c +++ b/src/rugby-possibility-widget.c @@ -6,6 +6,8 @@ #include <config.h> +#include <adwaita.h> + #include "rugby-possibility-widget.h" struct _RugbyPossibilityWidget @@ -74,7 +76,8 @@ rugby_possibility_widget_set_property (GObject *object, } static void -render_bar (GtkSnapshot *snapshot, +render_bar (GtkWidget *widget, + GtkSnapshot *snapshot, float x, float w, float h, @@ -93,11 +96,17 @@ render_bar (GtkSnapshot *snapshot, &area); gtk_snapshot_pop (snapshot); - GdkRGBA black = { 0.0, 0.0, 0.0, 0.2 }; + GtkStyleContext *ctx = gtk_widget_get_style_context (widget); + GdkRGBA border_colour; + gtk_style_context_lookup_color (ctx, "card_fg_color", &border_colour); + gtk_snapshot_append_border (snapshot, &rounded, (float[]) { 2.0, 2.0, 2.0, 2.0 }, - (GdkRGBA[]) { black, black, black, black }); + (GdkRGBA[]) { border_colour, + border_colour, + border_colour, + border_colour }); } static void @@ -130,7 +139,7 @@ rugby_possibility_widget_snapshot (GtkWidget *widget, for (int i = 0; i < tries; i++) { gtk_style_context_lookup_color (ctx, "green_3", &rgba); - render_bar (snapshot, x, w, height, rgba); + render_bar (widget, snapshot, x, w, height, rgba); x += w; } @@ -139,7 +148,7 @@ rugby_possibility_widget_snapshot (GtkWidget *widget, for (int i = 0; i < utries; i++) { gtk_style_context_lookup_color (ctx, "red_3", &rgba); - render_bar (snapshot, x, w, height, rgba); + render_bar (widget, snapshot, x, w, height, rgba); x += w; } @@ -148,7 +157,7 @@ rugby_possibility_widget_snapshot (GtkWidget *widget, for (int i = 0; i < kicks; i++) { gtk_style_context_lookup_color (ctx, "yellow_3", &rgba); - render_bar (snapshot, x, w, height, rgba); + render_bar (widget, snapshot, x, w, height, rgba); x += w; } }