diff --git a/Base/res/graphics/welcome-serendipity.png b/Base/res/graphics/welcome-serendipity.png deleted file mode 100644 index f86ba0cce7ac07..00000000000000 Binary files a/Base/res/graphics/welcome-serendipity.png and /dev/null differ diff --git a/Userland/Applications/Serendipity/SerendipityWidget.cpp b/Userland/Applications/Serendipity/SerendipityWidget.cpp index c18ba5395a19f3..27ff445b3ba377 100644 --- a/Userland/Applications/Serendipity/SerendipityWidget.cpp +++ b/Userland/Applications/Serendipity/SerendipityWidget.cpp @@ -31,7 +31,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -43,9 +44,6 @@ SerendipityWidget::SerendipityWidget() { load_from_gml(serendipity_window_gml); - auto& banner_label = *find_descendant_of_type_named("banner_label"); - banner_label.set_icon(Gfx::Bitmap::load_from_file("/res/graphics/welcome-serendipity.png")); - auto& tip_frame = *find_descendant_of_type_named("tip_frame"); tip_frame.set_background_role(Gfx::ColorRole::Base); tip_frame.set_fill_with_background_color(true); @@ -153,3 +151,14 @@ void SerendipityWidget::set_random_tip() m_initial_tip_index = n; m_tip_label->set_text(m_tips[n]); } + +void SerendipityWidget::paint_event(GUI::PaintEvent& event) +{ + GUI::Painter painter(*this); + painter.add_clip_rect(event.rect()); + + static auto font = Gfx::BitmapFont::load_from_file("/res/fonts/MarietaRegular24.font"); + painter.draw_text({ 12, 4, 1, 30 }, "Welcome to ", *font, Gfx::TextAlignment::CenterLeft, palette().base_text()); + painter.draw_text({ 12 + font->width("Welcome to "), 4, 1, 30 }, "Serenity", font->bold_variant(), Gfx::TextAlignment::CenterLeft, palette().base_text()); + painter.draw_text({ 12 + font->width("Welcome to ") + font->bold_variant().width("Serenity"), 4, 1, 30 }, "OS", font->bold_variant(), Gfx::TextAlignment::CenterLeft, palette().base() == palette().window() ? palette().base_text() : palette().base()); +} diff --git a/Userland/Applications/Serendipity/SerendipityWidget.h b/Userland/Applications/Serendipity/SerendipityWidget.h index c4e5b1c781f8b0..ba70202ea70d6f 100644 --- a/Userland/Applications/Serendipity/SerendipityWidget.h +++ b/Userland/Applications/Serendipity/SerendipityWidget.h @@ -37,6 +37,8 @@ class SerendipityWidget final : public GUI::Widget { private: SerendipityWidget(); + virtual void paint_event(GUI::PaintEvent&) override; + void set_random_tip(); void open_and_parse_tips_file(); void open_and_parse_readme_file(); diff --git a/Userland/Applications/Serendipity/SerendipityWindow.gml b/Userland/Applications/Serendipity/SerendipityWindow.gml index 4f6b167768ab43..8e38cf840177ed 100644 --- a/Userland/Applications/Serendipity/SerendipityWindow.gml +++ b/Userland/Applications/Serendipity/SerendipityWindow.gml @@ -6,16 +6,6 @@ @GUI::Widget { fixed_height: 30 - layout: @GUI::HorizontalBoxLayout { - margins: [4, 0, 0, 0] - } - - @GUI::Label { - name: "banner_label" - fixed_width: 251 - } - - @GUI::Widget } @GUI::Widget {