1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibGUI: Split OpacitySlider into vertical and horizontal helper classes

This commit is contained in:
FrHun 2022-12-07 23:40:36 +01:00 committed by Andreas Kling
parent 99624a8df4
commit 59028515c0
9 changed files with 56 additions and 11 deletions

View file

@ -215,7 +215,7 @@ GalleryWidget::GalleryWidget()
m_opacity_imagewidget = sliders_tab->find_descendant_of_type_named<GUI::ImageWidget>("opacity_imagewidget");
m_opacity_imagewidget->load_from_file("/res/graphics/brand-banner.png"sv);
m_opacity_slider = sliders_tab->find_descendant_of_type_named<GUI::OpacitySlider>("opacity_slider");
m_opacity_slider = sliders_tab->find_descendant_of_type_named<GUI::HorizontalOpacitySlider>("opacity_slider");
m_opacity_slider->on_change = [&](auto percent) {
m_opacity_imagewidget->set_opacity_percent(percent);