1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 10:00:46 +00:00

GamesSettings: Use on_change callback for resetting cards defaults

This commit is contained in:
Kyle Lanmon 2024-03-14 16:01:03 -05:00 committed by Andrew Kaster
parent 1d243ef3e3
commit c2e13764bc

View File

@ -124,11 +124,7 @@ void CardSettingsWidget::reset_default_values()
{
m_background_color_input->set_color(Gfx::Color::from_rgb(0x008000));
set_card_back_image_path(default_card_back_image_path);
// FIXME: `set_text()` on a combobox doesn't trigger the `on_change` callback, but it probably should!
// Until then, we have to manually tell the preview to update.
m_card_front_images_combo_box->set_text(default_card_front_image_set);
Cards::CardPainter::the().set_front_images_set_name(card_front_images_set_name());
m_preview_frame->update();
}
bool CardSettingsWidget::set_card_back_image_path(StringView path)