PixelPaint: Add actions to swap colors or reset them to default values
This commit is contained in:
parent
db99e0917c
commit
e6f27cec39
Notes:
sideshowbarker
2024-07-18 12:14:22 +09:00
Author: https://github.com/LepkoQQ Commit: https://github.com/SerenityOS/serenity/commit/e6f27cec39c Pull-request: https://github.com/SerenityOS/serenity/pull/8055
1 changed files with 15 additions and 0 deletions
|
@ -220,6 +220,21 @@ int main(int argc, char** argv)
|
|||
},
|
||||
window));
|
||||
|
||||
edit_menu.add_separator();
|
||||
edit_menu.add_action(GUI::Action::create(
|
||||
"&Swap Colors", { Mod_None, Key_X }, [&](auto&) {
|
||||
auto old_primary_color = image_editor.primary_color();
|
||||
image_editor.set_primary_color(image_editor.secondary_color());
|
||||
image_editor.set_secondary_color(old_primary_color);
|
||||
},
|
||||
window));
|
||||
edit_menu.add_action(GUI::Action::create(
|
||||
"&Default Colors", { Mod_None, Key_D }, [&](auto&) {
|
||||
image_editor.set_primary_color(Color::Black);
|
||||
image_editor.set_secondary_color(Color::White);
|
||||
},
|
||||
window));
|
||||
|
||||
auto& view_menu = menubar->add_menu("&View");
|
||||
|
||||
auto zoom_in_action = GUI::CommonActions::make_zoom_in_action(
|
||||
|
|
Loading…
Add table
Reference in a new issue