mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:58:11 +00:00
ProfileViewer: Add a basic menu bar to make it look proper
This commit is contained in:
parent
0a75a46501
commit
648ed76085
1 changed files with 11 additions and 0 deletions
|
@ -1,7 +1,10 @@
|
||||||
#include "Profile.h"
|
#include "Profile.h"
|
||||||
#include "ProfileTimelineWidget.h"
|
#include "ProfileTimelineWidget.h"
|
||||||
|
#include <LibGUI/GAction.h>
|
||||||
#include <LibGUI/GApplication.h>
|
#include <LibGUI/GApplication.h>
|
||||||
#include <LibGUI/GBoxLayout.h>
|
#include <LibGUI/GBoxLayout.h>
|
||||||
|
#include <LibGUI/GMenu.h>
|
||||||
|
#include <LibGUI/GMenuBar.h>
|
||||||
#include <LibGUI/GTreeView.h>
|
#include <LibGUI/GTreeView.h>
|
||||||
#include <LibGUI/GWindow.h>
|
#include <LibGUI/GWindow.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -39,6 +42,14 @@ int main(int argc, char** argv)
|
||||||
tree_view->set_size_columns_to_fit_content(true);
|
tree_view->set_size_columns_to_fit_content(true);
|
||||||
tree_view->set_model(profile->model());
|
tree_view->set_model(profile->model());
|
||||||
|
|
||||||
|
auto menubar = make<GMenuBar>();
|
||||||
|
auto app_menu = GMenu::construct("ProfileViewer");
|
||||||
|
app_menu->add_action(GCommonActions::make_quit_action([&](auto&) { app.quit(); }));
|
||||||
|
|
||||||
|
menubar->add_menu(move(app_menu));
|
||||||
|
|
||||||
|
app.set_menubar(move(menubar));
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue