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

LibGUI: Add base color to OpacitySlider

This patch adds a base color to OpacitySlider which will be used to
render the alpha gradient.
This commit is contained in:
networkException 2023-01-01 02:16:46 +01:00 committed by Sam Atkins
parent 16f934474f
commit f828bf6479
2 changed files with 13 additions and 1 deletions

View file

@ -17,6 +17,9 @@ class OpacitySlider : public AbstractSlider {
public:
virtual ~OpacitySlider() override = default;
void set_base_color(Gfx::Color);
Gfx::Color base_color() { return m_base_color; }
protected:
explicit OpacitySlider(Gfx::Orientation);
@ -29,6 +32,8 @@ protected:
private:
Gfx::IntRect frame_inner_rect() const;
Gfx::Color m_base_color { 0, 0, 0 };
virtual Optional<UISize> calculated_min_size() const override;
virtual Optional<UISize> calculated_preferred_size() const override;