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

GMLCompiler: Add enum initializer for opportunistic_resizee property

This patch adds a enum initializer for opportunistic_resizee and
makes the method that uses this property public so it's available for
GML compiler.
This commit is contained in:
tetektoza 2023-10-03 21:25:26 +02:00 committed by Tim Schumacher
parent 35d4b36201
commit 0be70ed97a
2 changed files with 2 additions and 1 deletions

View file

@ -177,6 +177,7 @@ static ErrorOr<Optional<String>> generate_enum_initializer_for(StringView proper
{ "frame_style"sv, "Gfx::FrameStyle"sv }, { "frame_style"sv, "Gfx::FrameStyle"sv },
{ "text_wrapping"sv, "Gfx::TextWrapping"sv }, { "text_wrapping"sv, "Gfx::TextWrapping"sv },
{ "button_style"sv, "Gfx::ButtonStyle"sv }, { "button_style"sv, "Gfx::ButtonStyle"sv },
{ "opportunistic_resizee"sv, "GUI::Splitter::OpportunisticResizee"sv },
}; };
auto const& enum_type_name = enum_properties.get(property_name); auto const& enum_type_name = enum_properties.get(property_name);

View file

@ -21,6 +21,7 @@ public:
}; };
virtual ~Splitter() override = default; virtual ~Splitter() override = default;
void set_opportunistic_resizee(OpportunisticResizee resizee) { m_opportunistic_resizee = resizee; }
protected: protected:
explicit Splitter(Gfx::Orientation); explicit Splitter(Gfx::Orientation);
@ -36,7 +37,6 @@ protected:
virtual void custom_layout() override; virtual void custom_layout() override;
OpportunisticResizee opportunistic_resizee() const { return m_opportunistic_resizee; } OpportunisticResizee opportunistic_resizee() const { return m_opportunistic_resizee; }
void set_opportunistic_resizee(OpportunisticResizee resizee) { m_opportunistic_resizee = resizee; }
private: private:
void override_cursor(bool do_override); void override_cursor(bool do_override);