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:
parent
c82627aae2
commit
5e34e43b0f
3 changed files with 85 additions and 0 deletions
20
Libraries/LibGUI/GAboutDialog.h
Normal file
20
Libraries/LibGUI/GAboutDialog.h
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue