MouseSettings: Avoid rendering artifact on loading highlighting defaults

Occasionally, the top of the preview would have the wrong opacity. This
seems to be solved by updating the widget again a bit after setting
the values.
This commit is contained in:
MacDue 2022-06-07 23:37:00 +01:00 committed by Linus Groh
parent 44cd973148
commit ceab9903cd
Notes: sideshowbarker 2024-07-17 10:19:21 +09:00

View file

@ -75,4 +75,8 @@ void HighlightWidget::reset_default_values()
m_highlight_opacity_slider->set_value(default_highlight_opacity);
m_highlight_color_input->set_color(default_highlight_color);
m_highlight_radius_slider->set_value(default_highlight_radius_length);
deferred_invoke([&] {
// Avoid artifact due to setting both color and opacity sliders:
m_highlight_preview->update();
});
}