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

PixelPaint: Add Filter Gallery Dialog to the Filter Menu

This patch adds the bare bones of the new Filter Gallery.
For now, only the gml and the basic layout got added, a fairly boringw
indow pops up when "Filter Gallery" is called.

The code for the Model used by the TreeView is taken in large parts from
HackStudio's VariableModel.
This commit is contained in:
Tobias Christiansen 2021-12-31 22:17:24 +01:00 committed by Andreas Kling
parent b46ea5158d
commit f47026b1d6
7 changed files with 277 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#include "CreateNewImageDialog.h"
#include "CreateNewLayerDialog.h"
#include "EditGuideDialog.h"
#include "FilterGallery.h"
#include "FilterParams.h"
#include <Applications/PixelPaint/PixelPaintWindowGML.h>
#include <LibConfig/Client.h>
@ -587,6 +588,13 @@ void MainWidget::initialize_menubar(GUI::Window& window)
}));
auto& filter_menu = window.add_menu("&Filter");
filter_menu.add_action(GUI::Action::create("Filter &Gallery", [&](auto&) {
auto dialog = PixelPaint::FilterGallery::construct(&window);
if (dialog->exec() != GUI::Dialog::ExecOK)
return;
}));
auto& spatial_filters_menu = filter_menu.add_submenu("&Spatial");
auto& edge_detect_submenu = spatial_filters_menu.add_submenu("&Edge Detect");