1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

PixelPaint: Remove context menu for PenTool

Remove the context menu for PenTool and just use the tool properties
widget.
This commit is contained in:
Marcus Nilsson 2021-08-02 20:06:40 +02:00 committed by Andreas Kling
parent e342bef854
commit cb6e63e579
2 changed files with 0 additions and 24 deletions

View file

@ -63,27 +63,6 @@ void PenTool::on_mousemove(Layer& layer, GUI::MouseEvent& event, GUI::MouseEvent
m_last_drawing_event_position = event.position();
}
void PenTool::on_tool_button_contextmenu(GUI::ContextMenuEvent& event)
{
if (!m_context_menu) {
m_context_menu = GUI::Menu::construct();
m_thickness_actions.set_exclusive(true);
auto insert_action = [&](int size, bool checked = false) {
auto action = GUI::Action::create_checkable(String::number(size), [this, size](auto&) {
m_thickness = size;
});
action->set_checked(checked);
m_thickness_actions.add_action(*action);
m_context_menu->add_action(move(action));
};
insert_action(1, true);
insert_action(2);
insert_action(3);
insert_action(4);
}
m_context_menu->popup(event.screen_position());
}
GUI::Widget* PenTool::get_properties_widget()
{
if (!m_properties_widget) {