1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

VisualBuilder: Add GSlider to the widgets toolbox.

This commit is contained in:
Andreas Kling 2019-04-30 16:18:05 +02:00
parent fb0c598d22
commit 86aad50818
6 changed files with 26 additions and 0 deletions

View file

@ -112,6 +112,13 @@ GWindow* make_toolbox_window()
if (auto* form = VBForm::current())
form->insert_widget(VBWidgetType::GProgressBar);
};
auto* slider_button = new GButton(widget);
slider_button->set_tooltip("GSlider");
slider_button->set_icon(GraphicsBitmap::load_from_file("/res/icons/vbwidgets/slider.png"));
slider_button->on_click = [] (GButton&) {
if (auto* form = VBForm::current())
form->insert_widget(VBWidgetType::GSlider);
};
auto* checkbox_button = new GButton(widget);
checkbox_button->set_tooltip("GCheckBox");
checkbox_button->set_icon(GraphicsBitmap::load_from_file("/res/icons/vbwidgets/checkbox.png"));