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

HackStudio: Only query token information if semantic highlighting is on

This commit is contained in:
Itamar 2022-02-12 11:20:25 +02:00 committed by Andreas Kling
parent a456759d7a
commit 8bb4d46676
5 changed files with 18 additions and 1 deletions

View file

@ -1166,7 +1166,9 @@ void HackStudioWidget::create_project_menu(GUI::Window& window)
new_submenu.add_action(*m_new_plain_file_action);
new_submenu.add_separator();
new_submenu.add_action(*m_new_directory_action);
project_menu.add_action(create_toggle_syntax_highlighting_mode_action());
m_toggle_semantic_highlighting_action = create_toggle_syntax_highlighting_mode_action();
project_menu.add_action(*m_toggle_semantic_highlighting_action);
}
void HackStudioWidget::create_edit_menu(GUI::Window& window)
@ -1536,4 +1538,9 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_toggle_syntax_highlighting_m
return action;
}
bool HackStudioWidget::semantic_syntax_highlighting_is_enabled() const
{
return m_toggle_semantic_highlighting_action->is_checked();
}
}