mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Everywhere: Use GUI::CommonActions::make_about_action()
This commit is contained in:
parent
f0a59ab7fb
commit
fedf561f57
Notes:
sideshowbarker
2024-07-19 00:06:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fedf561f577
36 changed files with 46 additions and 161 deletions
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "CalculatorWidget.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
|
@ -77,9 +76,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Calculator", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Calculator", app_icon));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "AddEventDialog.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -175,9 +174,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Calendar", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Calendar", app_icon));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->show();
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "DisplaySettings.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -75,9 +74,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Display Settings", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Display Settings", app_icon));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->show();
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <LibCore/MimeData.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -649,9 +648,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("File Manager", Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-folder.png"), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("File Manager", GUI::Icon::default_icon("filetype-folder")));
|
||||
|
||||
GUI::Application::the()->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <AK/URL.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -145,9 +144,8 @@ int main(int argc, char** argv)
|
|||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/FontEditor.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Font Editor", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Font Editor", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -275,9 +274,7 @@ int main(int argc, char* argv[])
|
|||
auto menubar = GUI::MenuBar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Help");
|
||||
app_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Help", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
app_menu.add_action(GUI::CommonActions::make_about_action("Help", app_icon, window));
|
||||
app_menu.add_separator();
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <AK/Optional.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Button.h>
|
||||
|
@ -191,9 +190,7 @@ HexEditorWidget::HexEditorWidget()
|
|||
}
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Hex Editor", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-hexeditor.png"), window());
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Hex Editor", GUI::Icon::default_icon("Hex Editor"), window()));
|
||||
|
||||
GUI::Application::the()->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "IRCChannel.h"
|
||||
#include "IRCWindow.h"
|
||||
#include "IRCWindowListModel.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -296,9 +295,7 @@ void IRCAppWindow::setup_menus()
|
|||
channel_menu.add_action(*m_part_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [this](auto&) {
|
||||
GUI::AboutDialog::show("IRC Client", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-irc-client.png"), this);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("IRC Client", GUI::Icon::default_icon("app-irc-client"), this));
|
||||
|
||||
GUI::Application::the()->set_menubar(move(menubar));
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "KeyboardMapperWidget.h"
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -56,7 +55,7 @@ int main(int argc, char** argv)
|
|||
auto app_icon = GUI::Icon::default_icon("app-keyboard-mapper");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("KeyboardMapper");
|
||||
window->set_title("Keyboard Mapper");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_main_widget<KeyboardMapperWidget>();
|
||||
window->resize(775, 315);
|
||||
|
@ -98,15 +97,10 @@ int main(int argc, char** argv)
|
|||
app->quit();
|
||||
});
|
||||
|
||||
auto about_action = GUI::Action::create("About",
|
||||
[&](auto&) {
|
||||
GUI::AboutDialog::show("KeyboardMapper", app_icon.bitmap_for_size(32), window);
|
||||
});
|
||||
|
||||
// Menu
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("KeyboardMapper");
|
||||
auto& app_menu = menubar->add_menu("Keyboard Mapper");
|
||||
app_menu.add_action(open_action);
|
||||
app_menu.add_action(save_action);
|
||||
app_menu.add_action(save_as_action);
|
||||
|
@ -114,7 +108,7 @@ int main(int argc, char** argv)
|
|||
app_menu.add_action(quit_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(about_action);
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Keyboard Mapper", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -114,7 +113,7 @@ int main(int argc, char** argv)
|
|||
ASSERT(initial_keymap_index < character_map_files.size());
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Keyboard settings");
|
||||
window->set_title("Keyboard Settings");
|
||||
window->resize(300, 70);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
|
@ -187,18 +186,13 @@ int main(int argc, char** argv)
|
|||
app->quit();
|
||||
});
|
||||
|
||||
auto about_action = GUI::Action::create("About",
|
||||
[&](auto&) {
|
||||
GUI::AboutDialog::show("Keyboard settings", app_icon.bitmap_for_size(32), window);
|
||||
});
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Keyboard settings");
|
||||
auto& app_menu = menubar->add_menu("Keyboard Settings");
|
||||
app_menu.add_action(quit_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(about_action);
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Keyboard Settings", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -57,7 +56,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto app_icon = GUI::Icon::default_icon("app-mouse");
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Mouse settings");
|
||||
window->set_title("Mouse Settings");
|
||||
window->resize(200, 130);
|
||||
window->set_resizable(false);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
@ -121,14 +120,12 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto& app_menu = menubar->add_menu("Mouse settings");
|
||||
auto& app_menu = menubar->add_menu("Mouse Settings");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
app->quit();
|
||||
}));
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Mouse settings", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Mouse Settings", app_icon, window));
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include <LibAudio/WavWriter.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -130,9 +129,7 @@ int main(int argc, char** argv)
|
|||
main_widget.add_actions(edit_menu);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Piano", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Piano", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "Tool.h"
|
||||
#include "ToolPropertiesWidget.h"
|
||||
#include "ToolboxWidget.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -350,9 +349,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("PixelPaint", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("PixelPaint", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <AK/URL.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -247,11 +246,6 @@ int main(int argc, char** argv)
|
|||
toolbar_container.set_visible(!toolbar_container.is_visible());
|
||||
});
|
||||
|
||||
auto about_action = GUI::Action::create("About",
|
||||
[&](auto&) {
|
||||
GUI::AboutDialog::show("QuickShow", app_icon.bitmap_for_size(32), window);
|
||||
});
|
||||
|
||||
auto copy_action = GUI::CommonActions::make_copy_action([&](auto&) {
|
||||
if (widget.bitmap())
|
||||
GUI::Clipboard::the().set_bitmap(*widget.bitmap());
|
||||
|
@ -301,7 +295,7 @@ int main(int argc, char** argv)
|
|||
view_menu.add_action(hide_show_toolbar_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(about_action);
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("QuickShow", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "SoundPlayerWidget.h"
|
||||
#include <LibAudio/ClientConnection.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -61,13 +60,13 @@ int main(int argc, char** argv)
|
|||
auto app_icon = GUI::Icon::default_icon("app-sound-player");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("SoundPlayer");
|
||||
window->set_title("Sound Player");
|
||||
window->set_resizable(false);
|
||||
window->resize(350, 140);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto& app_menu = menubar->add_menu("SoundPlayer");
|
||||
auto& app_menu = menubar->add_menu("Sound Player");
|
||||
auto& player = window->set_main_widget<SoundPlayerWidget>(window, audio_client);
|
||||
|
||||
if (argc > 1) {
|
||||
|
@ -101,9 +100,7 @@ int main(int argc, char** argv)
|
|||
playback_menu.add_action(move(loop));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("SoundPlayer", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Sound Player", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <AK/ScopeGuard.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -244,9 +243,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
app_menu.add_separator();
|
||||
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Spreadsheet", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Spreadsheet", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "ThreadStackWidget.h"
|
||||
#include <AK/NumberFormat.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -305,9 +304,7 @@ int main(int argc, char** argv)
|
|||
make_frequency_action("5 sec", 5000);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("System Monitor", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("System Monitor", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <Applications/Terminal/TerminalSettingsWindowGML.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -476,9 +475,7 @@ int main(int argc, char** argv)
|
|||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/Terminal.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Terminal", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Terminal", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <LibCore/File.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -476,9 +475,7 @@ TextEditorWidget::TextEditorWidget()
|
|||
syntax_menu.add_action(*m_shell_highlight);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Text Editor", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-text-editor.png"), window());
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Text Editor", GUI::Icon::default_icon("app-text-editor"), window()));
|
||||
|
||||
GUI::Application::the()->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
*/
|
||||
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -224,9 +223,7 @@ int main(int argc, char** argv)
|
|||
auto& app_menu = menubar->add_menu("CatDog Demo");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("CatDog Demo", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window));
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
window->show();
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "EyesWidget.h"
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -104,9 +103,7 @@ int main(int argc, char* argv[])
|
|||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Eyes Demo", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Eyes Demo", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->show();
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -203,9 +202,7 @@ int main(int argc, char** argv)
|
|||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Mouse Demo", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Mouse Demo", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->set_resizable(false);
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -115,9 +114,7 @@ int main(int argc, char** argv)
|
|||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Widget Gallery", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Widget Gallery", app_icon, window));
|
||||
|
||||
auto& root_widget = window->set_main_widget<GUI::Widget>();
|
||||
root_widget.set_fill_with_background_color(true);
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibDebug/DebugSession.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -890,9 +889,7 @@ void HackStudioWidget::create_view_menubar(GUI::MenuBar& menubar)
|
|||
void HackStudioWidget::create_help_menubar(GUI::MenuBar& menubar)
|
||||
{
|
||||
auto& help_menu = menubar.add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [this](auto&) {
|
||||
GUI::AboutDialog::show("HackStudio", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-hack-studio.png"), window());
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Hack Studio", GUI::Icon::default_icon("app-hack-studio"), window()));
|
||||
}
|
||||
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_stop_action()
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "RemoteObjectGraphModel.h"
|
||||
#include "RemoteObjectPropertyModel.h"
|
||||
#include "RemoteProcess.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -108,9 +107,7 @@ int main(int argc, char** argv)
|
|||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Inspector", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Inspector", app_icon, window));
|
||||
|
||||
auto& widget = window->set_main_widget<GUI::Widget>();
|
||||
widget.set_fill_with_background_color(true);
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <LibCore/File.h>
|
||||
#include <LibCore/Property.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/AutocompleteProvider.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -349,9 +348,7 @@ int main(int argc, char** argv)
|
|||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
||||
Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/Playground.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("GML Playground", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("GML Playground", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/ProcessStatisticsReader.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -145,9 +144,7 @@ int main(int argc, char** argv)
|
|||
view_menu.add_action(percent_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Profiler", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Profiler", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "Game.h"
|
||||
#include "GameSizeDialog.h"
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -204,9 +203,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("2048", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("2048", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "Game.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -83,9 +82,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Breakout", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Breakout", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "ChessWidget.h"
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
|
@ -221,9 +220,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Chess", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Chess", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "Game.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -81,9 +80,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Conway", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Conway", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "Field.h"
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -141,9 +140,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Minesweeper", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Minesweeper", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "Game.h"
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
|
@ -83,9 +82,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
|
||||
GUI::AboutDialog::show("Pong", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Pong", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "SnakeGame.h"
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -91,9 +90,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Snake", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Snake", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "SolitaireWidget.h"
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
|
@ -74,9 +73,7 @@ int main(int argc, char** argv)
|
|||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Solitaire", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Solitaire", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->set_main_widget(widget);
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
@ -74,9 +74,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("HTML", Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-html.png"), window);
|
||||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("HTML", GUI::Icon::default_icon("filetype-html"), window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
|
|
Loading…
Reference in a new issue