Files
ladybird/Userland/Applications/PixelPaint/CMakeLists.txt
Mustafa Quraish 5a8c6b95e6 PixelPaint: Refactor main.cpp into MainWidget
Previously, all the UI setup was done in `main.cpp`, with a whole
bunch of lambdas,, and actions etc just being stored in the main
function. This is probably an artifact from back when it was first
created.

Most other applications now have a "MainWidget" class of some sort
which handles setting up all the UI/menubars, etc. More importantly,,
it also lets us handle application-wide events which we were
previously not able to do directly, since the main widget was just
a default GUI::Widget.

This patch moves all the core functionality of the PixelPaint
application into PixelPaint::MainWidget, which is then instantiated
by the main function. There is likely some more refactoring that
would help, but this commit is big enough as it is doing mostly
a direct port.
2021-09-06 10:36:08 +02:00

48 lines
1.1 KiB
CMake

serenity_component(
PixelPaint
RECOMMENDED
TARGETS PixelPaint
DEPENDS ImageDecoder FileSystemAccessServer
)
compile_gml(PixelPaintWindow.gml PixelPaintWindowGML.h pixel_paint_window_gml)
compile_gml(EditGuideDialog.gml EditGuideDialogGML.h edit_guide_dialog_gml)
set(SOURCES
BrushTool.cpp
BucketTool.cpp
CreateNewImageDialog.cpp
CreateNewLayerDialog.cpp
EditGuideDialog.cpp
EditGuideDialogGML.h
EllipseTool.cpp
EraseTool.cpp
GuideTool.cpp
Image.cpp
ImageEditor.cpp
Layer.cpp
LayerListWidget.cpp
LayerPropertiesWidget.cpp
LineTool.cpp
MainWidget.cpp
main.cpp
MoveTool.cpp
PaletteWidget.cpp
PenTool.cpp
PickerTool.cpp
PixelPaintWindowGML.h
ProjectLoader.cpp
RectangleTool.cpp
RectangleSelectTool.cpp
Mask.cpp
Selection.cpp
SprayTool.cpp
ToolboxWidget.cpp
ToolPropertiesWidget.cpp
Tool.cpp
ZoomTool.cpp
)
serenity_app(PixelPaint ICON app-pixel-paint)
target_link_libraries(PixelPaint LibImageDecoderClient LibGUI LibGfx LibFileSystemAccessClient)