1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibGfx+LibGUI: Add support for vertical ProgressBars

This commit is contained in:
thankyouverycool 2021-03-07 17:39:01 -05:00 committed by Andreas Kling
parent bd34cdbbb3
commit 5806630cf4
7 changed files with 60 additions and 13 deletions

View file

@ -245,7 +245,7 @@ void Painter::fill_rect_with_gradient(Orientation orientation, const IntRect& a_
float c = offset * increment;
float c_alpha = gradient_start.alpha() + offset * alpha_increment;
for (int i = clipped_rect.height() - 1; i >= 0; --i) {
auto color = gamma_accurate_blend(gradient_start, gradient_end, c);
auto color = gamma_accurate_blend(gradient_end, gradient_start, c);
color.set_alpha(c_alpha);
for (int j = 0; j < clipped_rect.width(); ++j) {
dst[j] = color.value();