mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
VisualBuilder: Use GAboutDialog :^)
This commit is contained in:
parent
72acccb051
commit
a77814bdee
Notes:
sideshowbarker
2024-07-19 12:03:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a77814bdee7
@ -2,6 +2,8 @@
|
||||
#include "VBPropertiesWindow.h"
|
||||
#include "VBWidget.h"
|
||||
#include "VBWidgetPropertyModel.h"
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <LibGUI/GAboutDialog.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
@ -45,14 +47,6 @@ int main(int argc, char** argv)
|
||||
}));
|
||||
menubar->add_menu(move(file_menu));
|
||||
|
||||
auto help_menu = make<GMenu>("Help");
|
||||
help_menu->add_action(GAction::create("About", [](const GAction&) {
|
||||
dbgprintf("FIXME: Implement Help/About\n");
|
||||
}));
|
||||
menubar->add_menu(move(help_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
auto* window = new GWindow;
|
||||
window->set_title(form1->name());
|
||||
window->set_rect(120, 200, 640, 400);
|
||||
@ -60,6 +54,14 @@ int main(int argc, char** argv)
|
||||
|
||||
window->show();
|
||||
|
||||
auto help_menu = make<GMenu>("Help");
|
||||
help_menu->add_action(GAction::create("About", [&](const GAction&) {
|
||||
GAboutDialog::show("Visual Builder", load_png("/res/icons/32x32/app-visual-builder.png"), window);
|
||||
}));
|
||||
menubar->add_menu(move(help_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
auto* toolbox = make_toolbox_window();
|
||||
toolbox->show();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user