mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 20:58:16 +00:00
LibGfx+LibGUI: Add support for vertical ProgressBars
This commit is contained in:
parent
bd34cdbbb3
commit
5806630cf4
Notes:
sideshowbarker
2024-07-18 21:30:06 +09:00
Author: https://github.com/thankyouverycool
Commit: 5806630cf4
Pull-request: https://github.com/SerenityOS/serenity/pull/5741
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/emanuele6
7 changed files with 60 additions and 13 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue