1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

LibGUI, About: Implement system-wide W2k-esque About dialog

The new About dialog reads version information from /res/version.ini,
which is generated at build time.
This commit is contained in:
Nick Vella 2020-05-24 14:26:33 +00:00 committed by Andreas Kling
parent 0d5b43552d
commit e53fa97cfb
6 changed files with 74 additions and 87 deletions

View file

@ -35,14 +35,17 @@ class AboutDialog final : public Dialog {
public:
virtual ~AboutDialog() override;
static void show(const StringView& name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr)
static void show(const StringView& name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, const Gfx::Bitmap* window_icon = nullptr)
{
auto dialog = AboutDialog::construct(name, icon, parent_window);
if (window_icon)
dialog->set_icon(window_icon);
dialog->exec();
}
private:
AboutDialog(const StringView& name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr);
String version_string() const;
String m_name;
RefPtr<Gfx::Bitmap> m_icon;