mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +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:
parent
90d967baf1
commit
e73aeb4cea
Notes:
sideshowbarker
2024-07-17 05:03:57 +09:00
Author: https://github.com/tslater2006 Commit: https://github.com/SerenityOS/serenity/commit/e73aeb4cea Pull-request: https://github.com/SerenityOS/serenity/pull/15806 Reviewed-by: https://github.com/gmta
2 changed files with 13 additions and 0 deletions
|
@ -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())
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
@GUI::GroupBox {
|
||||
title: "Histogram"
|
||||
preferred_height: "shrink"
|
||||
visible: false
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [6]
|
||||
}
|
||||
|
@ -80,6 +81,7 @@
|
|||
@GUI::GroupBox {
|
||||
title: "Vectorscope"
|
||||
min_height: 80
|
||||
visible: false
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [6]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue