mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 09:06:08 +00:00
PixelPaint: Add icon and keyboard shortcut for the "New Image" action
This commit is contained in:
parent
4e56e9fa2a
commit
9288e64179
Notes:
sideshowbarker
2024-07-18 20:35:40 +09:00
Author: https://github.com/awesomekling
Commit: 9288e64179
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
file_menu.add_action(
|
file_menu.add_action(
|
||||||
GUI::Action::create(
|
GUI::Action::create(
|
||||||
"&New Image...", [&](auto&) {
|
"&New Image...", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [&](auto&) {
|
||||||
auto dialog = PixelPaint::CreateNewImageDialog::construct(window);
|
auto dialog = PixelPaint::CreateNewImageDialog::construct(window);
|
||||||
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
||||||
auto image = PixelPaint::Image::create_with_size(dialog->image_size());
|
auto image = PixelPaint::Image::create_with_size(dialog->image_size());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue