mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +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(CreateNewGuideDialog.gml CreateNewGuideDialogGML.h create_new_guide_dialog_gml)
|
||||
compile_gml(EditGuideDialog.gml EditGuideDialogGML.h edit_guide_dialog_gml)
|
||||
|
||||
set(SOURCES
|
||||
BrushTool.cpp
|
||||
BucketTool.cpp
|
||||
CreateNewGuideDialog.cpp
|
||||
CreateNewGuideDialogGML.h
|
||||
CreateNewImageDialog.cpp
|
||||
CreateNewLayerDialog.cpp
|
||||
EditGuideDialog.cpp
|
||||
EditGuideDialogGML.h
|
||||
EllipseTool.cpp
|
||||
EraseTool.cpp
|
||||
GuideTool.cpp
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "CreateNewGuideDialog.h"
|
||||
#include <Applications/PixelPaint/CreateNewGuideDialogGML.h>
|
||||
#include "EditGuideDialog.h"
|
||||
#include <Applications/PixelPaint/EditGuideDialogGML.h>
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/RadioButton.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace PixelPaint {
|
||||
|
||||
CreateNewGuideDialog::CreateNewGuideDialog(GUI::Window* parent_window)
|
||||
EditGuideDialog::EditGuideDialog(GUI::Window* parent_window)
|
||||
: Dialog(parent_window)
|
||||
{
|
||||
set_title("Create new Guide");
|
||||
|
@ -22,7 +22,7 @@ CreateNewGuideDialog::CreateNewGuideDialog(GUI::Window* parent_window)
|
|||
set_resizable(false);
|
||||
|
||||
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();
|
||||
|
||||
auto horizontal_radio = main_widget.find_descendant_of_type_named<GUI::RadioButton>("orientation_horizontal_radio");
|
|
@ -7,19 +7,20 @@
|
|||
#pragma once
|
||||
|
||||
#include "Guide.h"
|
||||
#include "ImageEditor.h"
|
||||
#include <LibGUI/Dialog.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
class CreateNewGuideDialog final : public GUI::Dialog {
|
||||
C_OBJECT(CreateNewGuideDialog);
|
||||
class EditGuideDialog final : public GUI::Dialog {
|
||||
C_OBJECT(EditGuideDialog);
|
||||
|
||||
public:
|
||||
String const offset() const { return m_offset; }
|
||||
Guide::Orientation orientation() const { return m_orientation; }
|
||||
|
||||
private:
|
||||
CreateNewGuideDialog(GUI::Window* parent_window);
|
||||
EditGuideDialog(GUI::Window* parent_window);
|
||||
|
||||
String m_offset;
|
||||
Guide::Orientation m_orientation;
|
|
@ -4,9 +4,9 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "CreateNewGuideDialog.h"
|
||||
#include "CreateNewImageDialog.h"
|
||||
#include "CreateNewLayerDialog.h"
|
||||
#include "EditGuideDialog.h"
|
||||
#include "FilterParams.h"
|
||||
#include "Guide.h"
|
||||
#include "Image.h"
|
||||
|
@ -371,7 +371,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto add_guide_action = GUI::Action::create(
|
||||
"Add Guide", [&](auto&) {
|
||||
auto dialog = PixelPaint::CreateNewGuideDialog::construct(window);
|
||||
auto dialog = PixelPaint::EditGuideDialog::construct(window);
|
||||
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
||||
if (auto* editor = current_image_editor()) {
|
||||
auto specified_offset = dialog->offset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue