PixelPaint: Rename from PaintBrush :^)

This commit is contained in:
Andreas Kling 2020-05-20 20:35:35 +02:00
parent ff4eaa12b4
commit 58fa9c6e89
Notes: sideshowbarker 2024-07-19 06:18:44 +09:00
41 changed files with 58 additions and 58 deletions

View file

@ -9,7 +9,7 @@ add_subdirectory(FontEditor)
add_subdirectory(Help)
add_subdirectory(HexEditor)
add_subdirectory(IRCClient)
add_subdirectory(PaintBrush)
add_subdirectory(PixelPaint)
add_subdirectory(Piano)
add_subdirectory(QuickShow)
add_subdirectory(SoundPlayer)

View file

@ -33,7 +33,7 @@
#include <LibGfx/Bitmap.h>
#include <LibGfx/Rect.h>
namespace PaintBrush {
namespace PixelPaint {
BucketTool::BucketTool()
{

View file

@ -28,7 +28,7 @@
#include "Tool.h"
namespace PaintBrush {
namespace PixelPaint {
class BucketTool final : public Tool {
public:

View file

@ -19,5 +19,5 @@ set(SOURCES
Tool.cpp
)
serenity_bin(PaintBrush)
target_link_libraries(PaintBrush LibGUI LibGfx)
serenity_bin(PixelPaint)
target_link_libraries(PixelPaint LibGUI LibGfx)

View file

@ -31,7 +31,7 @@
#include <LibGUI/SpinBox.h>
#include <LibGUI/TextBox.h>
namespace PaintBrush {
namespace PixelPaint {
CreateNewLayerDialog::CreateNewLayerDialog(const Gfx::Size& suggested_size, GUI::Window* parent_window)
: Dialog(parent_window)

View file

@ -28,7 +28,7 @@
#include <LibGUI/Dialog.h>
namespace PaintBrush {
namespace PixelPaint {
class CreateNewLayerDialog final : public GUI::Dialog {
C_OBJECT(CreateNewLayerDialog);

View file

@ -33,7 +33,7 @@
#include <LibGfx/Rect.h>
#include <LibM/math.h>
namespace PaintBrush {
namespace PixelPaint {
EllipseTool::EllipseTool()
{

View file

@ -30,7 +30,7 @@
#include <LibGfx/Point.h>
#include <LibGUI/ActionGroup.h>
namespace PaintBrush {
namespace PixelPaint {
class EllipseTool final : public Tool {
public:

View file

@ -32,7 +32,7 @@
#include <LibGUI/Painter.h>
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
namespace PixelPaint {
EraseTool::EraseTool()
{

View file

@ -31,7 +31,7 @@
#include <LibGfx/Point.h>
#include <LibGfx/Forward.h>
namespace PaintBrush {
namespace PixelPaint {
class EraseTool final : public Tool {
public:

View file

@ -31,7 +31,7 @@
//#define PAINT_DEBUG
namespace PaintBrush {
namespace PixelPaint {
RefPtr<Image> Image::create_with_size(const Gfx::Size& size)
{

View file

@ -35,7 +35,7 @@
#include <LibGfx/Rect.h>
#include <LibGfx/Size.h>
namespace PaintBrush {
namespace PixelPaint {
class Layer;

View file

@ -32,7 +32,7 @@
#include <LibGUI/Painter.h>
#include <LibGfx/Palette.h>
namespace PaintBrush {
namespace PixelPaint {
ImageEditor::ImageEditor()
{

View file

@ -28,7 +28,7 @@
#include <LibGUI/Frame.h>
namespace PaintBrush {
namespace PixelPaint {
class Image;
class Layer;

View file

@ -27,7 +27,7 @@
#include "Layer.h"
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
namespace PixelPaint {
RefPtr<Layer> Layer::create_with_size(const Gfx::Size& size, const String& name)
{

View file

@ -31,7 +31,7 @@
#include <AK/String.h>
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
namespace PixelPaint {
class Layer : public RefCounted<Layer> {
AK_MAKE_NONCOPYABLE(Layer);

View file

@ -28,7 +28,7 @@
#include "Image.h"
#include "Layer.h"
namespace PaintBrush {
namespace PixelPaint {
NonnullRefPtr<LayerModel> LayerModel::create(Image& image)
{

View file

@ -28,7 +28,7 @@
#include <LibGUI/Model.h>
namespace PaintBrush {
namespace PixelPaint {
class Image;

View file

@ -32,7 +32,7 @@
#include <LibGUI/Painter.h>
#include <LibM/math.h>
namespace PaintBrush {
namespace PixelPaint {
static Gfx::Point constrain_line_angle(const Gfx::Point& start_pos, const Gfx::Point& end_pos, float angle_increment)
{

View file

@ -30,7 +30,7 @@
#include <LibGUI/ActionGroup.h>
#include <LibGfx/Point.h>
namespace PaintBrush {
namespace PixelPaint {
class LineTool final : public Tool {
public:

View file

@ -33,7 +33,7 @@
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
namespace PixelPaint {
MoveTool::MoveTool()
{

View file

@ -28,7 +28,7 @@
#include "Tool.h"
namespace PaintBrush {
namespace PixelPaint {
class MoveTool final : public Tool {
public:

View file

@ -30,7 +30,7 @@
#include <LibGUI/ColorPicker.h>
#include <LibGfx/Palette.h>
namespace PaintBrush {
namespace PixelPaint {
class ColorWidget : public GUI::Frame {
C_OBJECT(ColorWidget);

View file

@ -28,7 +28,7 @@
#include <LibGUI/Frame.h>
namespace PaintBrush {
namespace PixelPaint {
class ImageEditor;

View file

@ -31,7 +31,7 @@
#include <LibGUI/Menu.h>
#include <LibGUI/Painter.h>
namespace PaintBrush {
namespace PixelPaint {
PenTool::PenTool()
{

View file

@ -30,7 +30,7 @@
#include <LibGfx/Point.h>
#include <LibGUI/ActionGroup.h>
namespace PaintBrush {
namespace PixelPaint {
class PenTool final : public Tool {
public:

View file

@ -29,7 +29,7 @@
#include "Layer.h"
#include <LibGfx/Bitmap.h>
namespace PaintBrush {
namespace PixelPaint {
PickerTool::PickerTool()
{

View file

@ -28,7 +28,7 @@
#include "Tool.h"
namespace PaintBrush {
namespace PixelPaint {
class PickerTool final : public Tool {
public:

View file

@ -33,7 +33,7 @@
#include <LibGfx/Rect.h>
#include <LibM/math.h>
namespace PaintBrush {
namespace PixelPaint {
RectangleTool::RectangleTool()
{

View file

@ -30,7 +30,7 @@
#include <LibGfx/Point.h>
#include <LibGUI/Forward.h>
namespace PaintBrush {
namespace PixelPaint {
class RectangleTool final : public Tool {
public:

View file

@ -36,7 +36,7 @@
#include <LibM/math.h>
#include <stdio.h>
namespace PaintBrush {
namespace PixelPaint {
SprayTool::SprayTool()
{

View file

@ -31,7 +31,7 @@
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Painter.h>
namespace PaintBrush {
namespace PixelPaint {
class SprayTool final : public Tool {
public:

View file

@ -28,7 +28,7 @@
#include "ImageEditor.h"
#include <LibGUI/Action.h>
namespace PaintBrush {
namespace PixelPaint {
Tool::Tool()
{

View file

@ -29,7 +29,7 @@
#include <LibGUI/Event.h>
#include <LibGUI/Forward.h>
namespace PaintBrush {
namespace PixelPaint {
class ImageEditor;
class Layer;

View file

@ -39,7 +39,7 @@
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
namespace PaintBrush {
namespace PixelPaint {
class ToolButton final : public GUI::Button {
C_OBJECT(ToolButton)

View file

@ -29,7 +29,7 @@
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Frame.h>
namespace PaintBrush {
namespace PixelPaint {
class Tool;

View file

@ -60,7 +60,7 @@ int main(int argc, char** argv)
}
auto window = GUI::Window::construct();
window->set_title("PaintBrush");
window->set_title("PixelPaint");
window->set_rect(40, 100, 950, 570);
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-paintbrush.png"));
@ -68,20 +68,20 @@ int main(int argc, char** argv)
horizontal_container.set_layout<GUI::HorizontalBoxLayout>();
horizontal_container.layout()->set_spacing(0);
auto& toolbox = horizontal_container.add<PaintBrush::ToolboxWidget>();
auto& toolbox = horizontal_container.add<PixelPaint::ToolboxWidget>();
auto& vertical_container = horizontal_container.add<GUI::Widget>();
vertical_container.set_layout<GUI::VerticalBoxLayout>();
vertical_container.layout()->set_spacing(0);
auto& image_editor = vertical_container.add<PaintBrush::ImageEditor>();
auto& image_editor = vertical_container.add<PixelPaint::ImageEditor>();
image_editor.set_focus(true);
toolbox.on_tool_selection = [&](auto* tool) {
image_editor.set_active_tool(tool);
};
vertical_container.add<PaintBrush::PaletteWidget>(image_editor);
vertical_container.add<PixelPaint::PaletteWidget>(image_editor);
auto& right_panel = horizontal_container.add<GUI::Widget>();
right_panel.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
@ -94,7 +94,7 @@ int main(int argc, char** argv)
window->show();
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("PaintBrush");
auto& app_menu = menubar->add_menu("PixelPaint");
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
Optional<String> open_path = GUI::FilePicker::get_open_filepath();
@ -125,9 +125,9 @@ int main(int argc, char** argv)
auto& layer_menu = menubar->add_menu("Layer");
layer_menu.add_action(GUI::Action::create("Create new layer...", { Mod_Ctrl | Mod_Shift, Key_N }, [&](auto&) {
auto dialog = PaintBrush::CreateNewLayerDialog::construct(image_editor.image()->size(), window);
auto dialog = PixelPaint::CreateNewLayerDialog::construct(image_editor.image()->size(), window);
if (dialog->exec() == GUI::Dialog::ExecOK) {
auto layer = PaintBrush::Layer::create_with_size(dialog->layer_size(), dialog->layer_name());
auto layer = PixelPaint::Layer::create_with_size(dialog->layer_size(), dialog->layer_name());
if (!layer) {
GUI::MessageBox::show_error(String::format("Unable to create layer with size %s", dialog->size().to_string().characters()));
return;
@ -179,7 +179,7 @@ int main(int argc, char** argv)
auto& help_menu = menubar->add_menu("Help");
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
GUI::AboutDialog::show("PaintBrush", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-paintbrush.png"), window);
GUI::AboutDialog::show("PixelPaint", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-paintbrush.png"), window);
}));
app.set_menubar(move(menubar));
@ -191,9 +191,9 @@ int main(int argc, char** argv)
layer_table_view.selection().clear();
};
auto image = PaintBrush::Image::create_with_size({ 640, 480 });
auto image = PixelPaint::Image::create_with_size({ 640, 480 });
auto bg_layer = PaintBrush::Layer::create_with_size({ 640, 480 }, "Background");
auto bg_layer = PixelPaint::Layer::create_with_size({ 640, 480 }, "Background");
image->add_layer(*bg_layer);
bg_layer->bitmap().fill(Color::White);
@ -201,7 +201,7 @@ int main(int argc, char** argv)
layer_table_view.on_selection_change = [&] {
auto index = layer_table_view.selection().first();
if (index.is_valid())
image_editor.set_active_layer(const_cast<PaintBrush::Layer*>(&image->layer(index.row())));
image_editor.set_active_layer(const_cast<PixelPaint::Layer*>(&image->layer(index.row())));
else
image_editor.set_active_layer(nullptr);
};

View file

@ -1,8 +0,0 @@
[App]
Name=PaintBrush
Executable=/bin/PaintBrush
Category=Graphics
[Icons]
16x16=/res/icons/16x16/app-paintbrush.png
32x32=/res/icons/32x32/app-paintbrush.png

View file

@ -0,0 +1,8 @@
[App]
Name=PixelPaint
Executable=/bin/PixelPaint
Category=Graphics
[Icons]
16x16=/res/icons/16x16/app-pixelpaint.png
32x32=/res/icons/32x32/app-pixelpaint.png

View file

@ -61,5 +61,5 @@ Serenity includes the Piano, which allows you to create your own tunes by
simply pressing keys on the keyboard. You can pick the wavetype, octave, and
more! Serenity also has SoundPlayer, which lets you play WAV files.
Serenity also has PaintBrush, which is a simple bitmap editor. Draw with the
Serenity also has PixelPaint, which is a layered bitmap editor. Draw with the
pencil and change colors. Try drawing shapes! Can't do that in GIMP!

View file

@ -134,7 +134,7 @@ ln -s VisualBuilder mnt/bin/vb
ln -s WidgetGallery mnt/bin/wg
ln -s TextEditor mnt/bin/te
ln -s HexEditor mnt/bin/he
ln -s PaintBrush mnt/bin/pb
ln -s PixelPaint mnt/bin/pp
ln -s QuickShow mnt/bin/qs
ln -s Piano mnt/bin/pi
ln -s SystemDialog mnt/bin/sd