mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:27:34 +00:00
PixelPaint: Adjust menu ampersand shortcut characters
A few of the menu items were missing shortcut characters completely, so in the interest of keyboard navigation some have been added (even if they are not ideal). In a few menus, severals actions had the same menu shortcut, so the later ones were not accessible through it. These have also been differentiated.
This commit is contained in:
parent
351dee4f8f
commit
c5b14fce54
1 changed files with 8 additions and 8 deletions
|
@ -255,7 +255,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
|
|
||||||
edit_menu.add_separator();
|
edit_menu.add_separator();
|
||||||
edit_menu.add_action(GUI::Action::create(
|
edit_menu.add_action(GUI::Action::create(
|
||||||
"&Swap Colors", { Mod_None, Key_X }, [&](auto&) {
|
"S&wap Colors", { Mod_None, Key_X }, [&](auto&) {
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
if (!editor)
|
if (!editor)
|
||||||
return;
|
return;
|
||||||
|
@ -316,7 +316,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
});
|
});
|
||||||
|
|
||||||
m_add_guide_action = GUI::Action::create(
|
m_add_guide_action = GUI::Action::create(
|
||||||
"Add Guide", [&](auto&) {
|
"&Add Guide", [&](auto&) {
|
||||||
auto dialog = PixelPaint::EditGuideDialog::construct(&window);
|
auto dialog = PixelPaint::EditGuideDialog::construct(&window);
|
||||||
if (dialog->exec() != GUI::Dialog::ExecOK)
|
if (dialog->exec() != GUI::Dialog::ExecOK)
|
||||||
return;
|
return;
|
||||||
|
@ -330,7 +330,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
|
|
||||||
// Save this so other methods can use it
|
// Save this so other methods can use it
|
||||||
m_show_guides_action = GUI::Action::create_checkable(
|
m_show_guides_action = GUI::Action::create_checkable(
|
||||||
"Show Guides", [&](auto& action) {
|
"Show &Guides", [&](auto& action) {
|
||||||
Config::write_bool("PixelPaint", "Guides", "Show", action.is_checked());
|
Config::write_bool("PixelPaint", "Guides", "Show", action.is_checked());
|
||||||
if (auto* editor = current_image_editor()) {
|
if (auto* editor = current_image_editor()) {
|
||||||
editor->set_guide_visibility(action.is_checked());
|
editor->set_guide_visibility(action.is_checked());
|
||||||
|
@ -351,14 +351,14 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
view_menu.add_action(*m_show_guides_action);
|
view_menu.add_action(*m_show_guides_action);
|
||||||
|
|
||||||
view_menu.add_action(GUI::Action::create(
|
view_menu.add_action(GUI::Action::create(
|
||||||
"Clear Guides", [&](auto&) {
|
"&Clear Guides", [&](auto&) {
|
||||||
if (auto* editor = current_image_editor())
|
if (auto* editor = current_image_editor())
|
||||||
editor->clear_guides();
|
editor->clear_guides();
|
||||||
}));
|
}));
|
||||||
view_menu.add_separator();
|
view_menu.add_separator();
|
||||||
|
|
||||||
auto show_pixel_grid_action = GUI::Action::create_checkable(
|
auto show_pixel_grid_action = GUI::Action::create_checkable(
|
||||||
"Show Pixel Grid", [&](auto& action) {
|
"Show &Pixel Grid", [&](auto& action) {
|
||||||
Config::write_bool("PixelPaint", "PixelGrid", "Show", action.is_checked());
|
Config::write_bool("PixelPaint", "PixelGrid", "Show", action.is_checked());
|
||||||
if (auto* editor = current_image_editor())
|
if (auto* editor = current_image_editor())
|
||||||
editor->set_pixel_grid_visibility(action.is_checked());
|
editor->set_pixel_grid_visibility(action.is_checked());
|
||||||
|
@ -367,7 +367,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
view_menu.add_action(*show_pixel_grid_action);
|
view_menu.add_action(*show_pixel_grid_action);
|
||||||
|
|
||||||
m_show_rulers_action = GUI::Action::create_checkable(
|
m_show_rulers_action = GUI::Action::create_checkable(
|
||||||
"Show Rulers", { Mod_Ctrl, Key_R }, [&](auto& action) {
|
"Show R&ulers", { Mod_Ctrl, Key_R }, [&](auto& action) {
|
||||||
Config::write_bool("PixelPaint", "Rulers", "Show", action.is_checked());
|
Config::write_bool("PixelPaint", "Rulers", "Show", action.is_checked());
|
||||||
if (auto* editor = current_image_editor()) {
|
if (auto* editor = current_image_editor()) {
|
||||||
editor->set_ruler_visibility(action.is_checked());
|
editor->set_ruler_visibility(action.is_checked());
|
||||||
|
@ -458,7 +458,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
m_layer_list_widget->select_top_layer();
|
m_layer_list_widget->select_top_layer();
|
||||||
}));
|
}));
|
||||||
layer_menu.add_action(GUI::Action::create(
|
layer_menu.add_action(GUI::Action::create(
|
||||||
"Select &Bottom Layer", { 0, Key_End }, [&](auto&) {
|
"Select B&ottom Layer", { 0, Key_End }, [&](auto&) {
|
||||||
m_layer_list_widget->select_bottom_layer();
|
m_layer_list_widget->select_bottom_layer();
|
||||||
}));
|
}));
|
||||||
layer_menu.add_separator();
|
layer_menu.add_separator();
|
||||||
|
@ -531,7 +531,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||||
};
|
};
|
||||||
layer_menu.add_separator();
|
layer_menu.add_separator();
|
||||||
layer_menu.add_action(GUI::Action::create(
|
layer_menu.add_action(GUI::Action::create(
|
||||||
"&Flatten Image", { Mod_Ctrl, Key_F }, [&](auto&) {
|
"Fl&atten Image", { Mod_Ctrl, Key_F }, [&](auto&) {
|
||||||
auto* editor = current_image_editor();
|
auto* editor = current_image_editor();
|
||||||
if (!editor)
|
if (!editor)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue