Desktop: Show DisplayProperties in context menu

This commit is contained in:
Jonathan Archer 2020-04-22 13:46:10 -05:00 committed by Andreas Kling
parent 5457020d4e
commit 3bbd7d9425
Notes: sideshowbarker 2024-07-19 17:34:37 +09:00

View file

@ -200,8 +200,14 @@ int run_in_desktop_mode(RefPtr<Core::ConfigFile> config, String initial_location
}
});
auto display_properties_action = GUI::Action::create("Display properties...", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-display-properties.png"), [&](const GUI::Action&) {
Core::DesktopServices::open(URL::create_with_file_protocol("/bin/DisplayProperties"));
});
desktop_view_context_menu->add_action(mkdir_action);
desktop_view_context_menu->add_action(touch_action);
desktop_view_context_menu->add_separator();
desktop_view_context_menu->add_action(display_properties_action);
item_view.on_context_menu_request = [&](const GUI::ModelIndex& index, const GUI::ContextMenuEvent& event) {
if (!index.is_valid())