diff --git a/Userland/Libraries/LibGfx/GradientPainting.cpp b/Userland/Libraries/LibGfx/GradientPainting.cpp index 6d924c5531..c0e18e183e 100644 --- a/Userland/Libraries/LibGfx/GradientPainting.cpp +++ b/Userland/Libraries/LibGfx/GradientPainting.cpp @@ -53,10 +53,10 @@ enum class UsePremultipliedAlpha { class GradientLine { public: GradientLine(int gradient_length, Span color_stops, Optional repeat_length, UsePremultipliedAlpha use_premultiplied_alpha = UsePremultipliedAlpha::Yes) - : m_repeating { repeat_length.has_value() } - , m_start_offset { round_to((m_repeating ? color_stops.first().position : 0.0f) * gradient_length) } - , m_color_stops { color_stops } - , m_use_premultiplied_alpha { use_premultiplied_alpha } + : m_repeating(repeat_length.has_value()) + , m_start_offset(round_to((m_repeating ? color_stops.first().position : 0.0f) * gradient_length)) + , m_color_stops(color_stops) + , m_use_premultiplied_alpha(use_premultiplied_alpha) { // Avoid generating excessive amounts of colors when the not enough shades to fill that length. auto necessary_length = min((color_stops.size() - 1) * 255, gradient_length);