mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
ProfileViewer: Add a basic menu bar to make it look proper
This commit is contained in:
parent
0a75a46501
commit
648ed76085
Notes:
sideshowbarker
2024-07-19 10:50:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/648ed760852
1 changed files with 11 additions and 0 deletions
|
@ -1,7 +1,10 @@
|
|||
#include "Profile.h"
|
||||
#include "ProfileTimelineWidget.h"
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GTreeView.h>
|
||||
#include <LibGUI/GWindow.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_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();
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue