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

PixelPaint: Make scopes hideable

Vectorscope and Histogram are now hidden by default. New menu "Scopes"
allows for them to be toggled on/off.
This commit is contained in:
Timothy Slater 2022-10-26 07:53:39 -05:00 committed by Andreas Kling
parent 90d967baf1
commit e73aeb4cea
2 changed files with 13 additions and 0 deletions

View file

@ -509,6 +509,17 @@ void MainWidget::initialize_menubar(GUI::Window& window)
m_show_active_layer_boundary_action->set_checked(Config::read_bool("PixelPaint"sv, "ImageEditor"sv, "ShowActiveLayerBoundary"sv, true));
m_view_menu->add_action(*m_show_active_layer_boundary_action);
m_view_menu->add_separator();
auto& scopes_menu = m_view_menu->add_submenu("&Scopes");
scopes_menu.add_action(GUI::Action::create_checkable("&Histogram", [&](auto& action) {
m_histogram_widget->parent_widget()->set_visible(action.is_checked());
}));
scopes_menu.add_action(GUI::Action::create_checkable("&Vectorscope", [&](auto& action) {
m_vectorscope_widget->parent_widget()->set_visible(action.is_checked());
}));
m_tool_menu = window.add_menu("&Tool");
m_toolbox->for_each_tool([&](auto& tool) {
if (tool.action())