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

GamesSettings: Rename Preview -> CardGamePreview

This commit is contained in:
Sam Atkins 2023-02-01 13:29:07 +00:00 committed by Andreas Kling
parent 286e3e6872
commit 66f2f4d647
3 changed files with 10 additions and 10 deletions

View file

@ -18,13 +18,13 @@ namespace GamesSettings {
static constexpr StringView default_card_back_image_path = "/res/icons/cards/buggie-deck.png"sv;
class Preview final : public Cards::CardGame {
C_OBJECT_ABSTRACT(Preview)
class CardGamePreview final : public Cards::CardGame {
C_OBJECT_ABSTRACT(CardGamePreview)
public:
static ErrorOr<NonnullRefPtr<Preview>> try_create()
static ErrorOr<NonnullRefPtr<CardGamePreview>> try_create()
{
auto preview = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) Preview()));
auto preview = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) CardGamePreview()));
Gfx::IntPoint point { 25, 30 };
TRY(preview->add_stack(point, Cards::CardStack::Type::Stock));
@ -51,7 +51,7 @@ public:
}
private:
Preview() = default;
CardGamePreview() = default;
virtual void paint_event(GUI::PaintEvent& event) override
{
@ -73,7 +73,7 @@ CardSettingsWidget::CardSettingsWidget()
auto background_color = Gfx::Color::from_string(Config::read_string("Games"sv, "Cards"sv, "BackgroundColor"sv)).value_or(Gfx::Color::from_rgb(0x008000));
m_preview_frame = find_descendant_of_type_named<Preview>("cards_preview");
m_preview_frame = find_descendant_of_type_named<CardGamePreview>("cards_preview");
m_preview_frame->set_background_color(background_color);
m_background_color_input = find_descendant_of_type_named<GUI::ColorInput>("cards_background_color");
@ -136,4 +136,4 @@ DeprecatedString CardSettingsWidget::card_back_image_path() const
}
REGISTER_WIDGET(GamesSettings, Preview);
REGISTER_WIDGET(GamesSettings, CardGamePreview);