mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:17:35 +00:00
PixelPaint: Rename CreateNewGuideDialog to EditGuideDialog
This doesn't change the behavior at all but sets the naming up be more descriptive on what it does in the next patches.
This commit is contained in:
parent
b3e3e4d45d
commit
abcb982485
5 changed files with 13 additions and 12 deletions
|
@ -6,15 +6,15 @@ serenity_component(
|
||||||
)
|
)
|
||||||
|
|
||||||
compile_gml(PixelPaintWindow.gml PixelPaintWindowGML.h pixel_paint_window_gml)
|
compile_gml(PixelPaintWindow.gml PixelPaintWindowGML.h pixel_paint_window_gml)
|
||||||
compile_gml(CreateNewGuideDialog.gml CreateNewGuideDialogGML.h create_new_guide_dialog_gml)
|
compile_gml(EditGuideDialog.gml EditGuideDialogGML.h edit_guide_dialog_gml)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
BrushTool.cpp
|
BrushTool.cpp
|
||||||
BucketTool.cpp
|
BucketTool.cpp
|
||||||
CreateNewGuideDialog.cpp
|
|
||||||
CreateNewGuideDialogGML.h
|
|
||||||
CreateNewImageDialog.cpp
|
CreateNewImageDialog.cpp
|
||||||
CreateNewLayerDialog.cpp
|
CreateNewLayerDialog.cpp
|
||||||
|
EditGuideDialog.cpp
|
||||||
|
EditGuideDialogGML.h
|
||||||
EllipseTool.cpp
|
EllipseTool.cpp
|
||||||
EraseTool.cpp
|
EraseTool.cpp
|
||||||
GuideTool.cpp
|
GuideTool.cpp
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CreateNewGuideDialog.h"
|
#include "EditGuideDialog.h"
|
||||||
#include <Applications/PixelPaint/CreateNewGuideDialogGML.h>
|
#include <Applications/PixelPaint/EditGuideDialogGML.h>
|
||||||
#include <LibGUI/Button.h>
|
#include <LibGUI/Button.h>
|
||||||
#include <LibGUI/RadioButton.h>
|
#include <LibGUI/RadioButton.h>
|
||||||
#include <LibGUI/TextBox.h>
|
#include <LibGUI/TextBox.h>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace PixelPaint {
|
namespace PixelPaint {
|
||||||
|
|
||||||
CreateNewGuideDialog::CreateNewGuideDialog(GUI::Window* parent_window)
|
EditGuideDialog::EditGuideDialog(GUI::Window* parent_window)
|
||||||
: Dialog(parent_window)
|
: Dialog(parent_window)
|
||||||
{
|
{
|
||||||
set_title("Create new Guide");
|
set_title("Create new Guide");
|
||||||
|
@ -22,7 +22,7 @@ CreateNewGuideDialog::CreateNewGuideDialog(GUI::Window* parent_window)
|
||||||
set_resizable(false);
|
set_resizable(false);
|
||||||
|
|
||||||
auto& main_widget = set_main_widget<GUI::Widget>();
|
auto& main_widget = set_main_widget<GUI::Widget>();
|
||||||
if (!main_widget.load_from_gml(create_new_guide_dialog_gml))
|
if (!main_widget.load_from_gml(edit_guide_dialog_gml))
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
|
|
||||||
auto horizontal_radio = main_widget.find_descendant_of_type_named<GUI::RadioButton>("orientation_horizontal_radio");
|
auto horizontal_radio = main_widget.find_descendant_of_type_named<GUI::RadioButton>("orientation_horizontal_radio");
|
|
@ -7,19 +7,20 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Guide.h"
|
#include "Guide.h"
|
||||||
|
#include "ImageEditor.h"
|
||||||
#include <LibGUI/Dialog.h>
|
#include <LibGUI/Dialog.h>
|
||||||
|
|
||||||
namespace PixelPaint {
|
namespace PixelPaint {
|
||||||
|
|
||||||
class CreateNewGuideDialog final : public GUI::Dialog {
|
class EditGuideDialog final : public GUI::Dialog {
|
||||||
C_OBJECT(CreateNewGuideDialog);
|
C_OBJECT(EditGuideDialog);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
String const offset() const { return m_offset; }
|
String const offset() const { return m_offset; }
|
||||||
Guide::Orientation orientation() const { return m_orientation; }
|
Guide::Orientation orientation() const { return m_orientation; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CreateNewGuideDialog(GUI::Window* parent_window);
|
EditGuideDialog(GUI::Window* parent_window);
|
||||||
|
|
||||||
String m_offset;
|
String m_offset;
|
||||||
Guide::Orientation m_orientation;
|
Guide::Orientation m_orientation;
|
|
@ -4,9 +4,9 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CreateNewGuideDialog.h"
|
|
||||||
#include "CreateNewImageDialog.h"
|
#include "CreateNewImageDialog.h"
|
||||||
#include "CreateNewLayerDialog.h"
|
#include "CreateNewLayerDialog.h"
|
||||||
|
#include "EditGuideDialog.h"
|
||||||
#include "FilterParams.h"
|
#include "FilterParams.h"
|
||||||
#include "Guide.h"
|
#include "Guide.h"
|
||||||
#include "Image.h"
|
#include "Image.h"
|
||||||
|
@ -371,7 +371,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
auto add_guide_action = GUI::Action::create(
|
auto add_guide_action = GUI::Action::create(
|
||||||
"Add Guide", [&](auto&) {
|
"Add Guide", [&](auto&) {
|
||||||
auto dialog = PixelPaint::CreateNewGuideDialog::construct(window);
|
auto dialog = PixelPaint::EditGuideDialog::construct(window);
|
||||||
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
||||||
if (auto* editor = current_image_editor()) {
|
if (auto* editor = current_image_editor()) {
|
||||||
auto specified_offset = dialog->offset();
|
auto specified_offset = dialog->offset();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue