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
commit 59028515c0
Notes: sideshowbarker 2024-07-17 04:03:27 +09:00
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);