LibGUI: Ensure final stop of the opacity slider gradient has 255 alpha
Otherwise, if you change the opacity in the color picker, the slider's opacity changes.
This commit is contained in:
parent
acf8e19eac
commit
9685d54291
Notes:
sideshowbarker
2024-07-16 23:44:30 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/9685d54291 Pull-request: https://github.com/SerenityOS/serenity/pull/18825
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ void OpacitySlider::paint_event(PaintEvent& event)
|
|||
Gfx::StylePainter::paint_transparency_grid(painter, inner_rect, palette());
|
||||
|
||||
// Alpha gradient
|
||||
painter.fill_rect_with_linear_gradient(inner_rect, Array { Gfx::ColorStop { Color::Transparent, 0 }, Gfx::ColorStop { m_base_color, 1 } },
|
||||
painter.fill_rect_with_linear_gradient(inner_rect, Array { Gfx::ColorStop { Color::Transparent, 0 }, Gfx::ColorStop { m_base_color.with_alpha(255), 1 } },
|
||||
orientation() == Orientation::Horizontal ? 90.0f : 180.0f);
|
||||
|
||||
constexpr int notch_size = 3;
|
||||
|
|
Loading…
Add table
Reference in a new issue