mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
GSlider: Add support for vertical sliders.
You now have to pass an Orientation to the GSlider constructor. It's not possible to change the orientation after construction. Added some vertical GSliders to the WidgetGallery demo for testing. :^)
This commit is contained in:
parent
8ab1923abe
commit
c59b053ad6
5 changed files with 70 additions and 41 deletions
|
@ -107,7 +107,7 @@ static GWidget* build_gwidget(VBWidgetType type, GWidget* parent)
|
|||
return bar;
|
||||
}
|
||||
case VBWidgetType::GSlider: {
|
||||
auto* slider = new GSlider(parent);
|
||||
auto* slider = new GSlider(Orientation::Horizontal, parent);
|
||||
slider->set_range(0, 100);
|
||||
slider->set_value(50);
|
||||
return slider;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue