diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-06 14:43:16 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-06 14:43:16 +0100 |
commit | dccf335d5b1aa06e44f9262c95b176c42ba2cf1e (patch) | |
tree | f426c8cabb635b49ebf6e4f59c3aa28aff42bee3 /Libraries | |
parent | 6a71ba1deb6cc34cfe22094207c70ec9996d1501 (diff) | |
download | serenity-dccf335d5b1aa06e44f9262c95b176c42ba2cf1e.zip |
LibGUI: Add HorizontalSlider and VerticalSlider convenience classes
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/GSlider.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Libraries/LibGUI/GSlider.h b/Libraries/LibGUI/GSlider.h index bb3c52b9ae..d3bbc06e0e 100644 --- a/Libraries/LibGUI/GSlider.h +++ b/Libraries/LibGUI/GSlider.h @@ -96,4 +96,28 @@ private: Orientation m_orientation { Orientation::Horizontal }; }; +class VerticalSlider final : public Slider { + C_OBJECT(VerticalSlider) +public: + virtual ~VerticalSlider() override {} + +private: + explicit VerticalSlider(Widget* parent) + : Slider(Orientation::Vertical, parent) + { + } +}; + +class HorizontalSlider final : public Slider { + C_OBJECT(HorizontalSlider) +public: + virtual ~HorizontalSlider() override {} + +private: + explicit HorizontalSlider(Widget* parent) + : Slider(Orientation::Horizontal, parent) + { + } +}; + } |