summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-05-14 10:40:44 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-15 06:40:18 +0200
commit9685d542912edf160a49556468cc994759f01031 (patch)
tree134d4e53e15e73c1637aeea2eb0b918c3eec2d82 /Userland/Libraries/LibGUI
parentacf8e19eac8612ae76778a64f1a5021c71342b63 (diff)
downloadserenity-9685d542912edf160a49556468cc994759f01031.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/OpacitySlider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/OpacitySlider.cpp b/Userland/Libraries/LibGUI/OpacitySlider.cpp
index 5e027fa226..fc9c36a097 100644
--- a/Userland/Libraries/LibGUI/OpacitySlider.cpp
+++ b/Userland/Libraries/LibGUI/OpacitySlider.cpp
@@ -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;