1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibGUI: Add HorizontalSlider and VerticalSlider convenience classes

This commit is contained in:
Andreas Kling 2020-02-06 14:43:16 +01:00
parent 6a71ba1deb
commit dccf335d5b
5 changed files with 39 additions and 15 deletions

View file

@ -133,7 +133,7 @@ static RefPtr<GUI::Widget> build_gwidget(VBWidgetType type, GUI::Widget* parent)
return bar;
}
case VBWidgetType::GSlider: {
auto slider = GUI::Slider::construct(Orientation::Horizontal, parent);
auto slider = GUI::HorizontalSlider::construct(parent);
slider->set_range(0, 100);
slider->set_value(50);
return slider;