1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibGUI: Add GAboutDialog, a simple way to show a nice about box in apps

This commit is contained in:
Andreas Kling 2019-09-02 19:45:55 +02:00
parent c82627aae2
commit 5e34e43b0f
3 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#pragma once
#include <LibGUI/GDialog.h>
class GAboutDialog final : public GDialog {
C_OBJECT(GAboutDialog)
public:
GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr);
virtual ~GAboutDialog() override;
static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr)
{
GAboutDialog dialog(name, icon, parent);
dialog.exec();
}
private:
String m_name;
RefPtr<GraphicsBitmap> m_icon;
};