1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 05:44:58 +00:00

LibGUI: Fix typo in Splitter's resizee Getter/Setter

This commit is contained in:
thankyouverycool 2023-08-12 20:25:46 -04:00 committed by Andreas Kling
parent a0a1411ec9
commit 1ea24c38b4
2 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,7 @@ namespace GUI {
Splitter::Splitter(Orientation orientation)
: m_orientation(orientation)
{
REGISTER_ENUM_PROPERTY("opportunistic_resizee", opportunisitic_resizee, set_opportunisitic_resizee, OpportunisticResizee,
REGISTER_ENUM_PROPERTY("opportunistic_resizee", opportunistic_resizee, set_opportunistic_resizee, OpportunisticResizee,
{ OpportunisticResizee::First, "First" },
{ OpportunisticResizee::Second, "Second" });
@ -216,21 +216,21 @@ void Splitter::mousemove_event(MouseEvent& event)
auto new_second_resizee_size = clamp(m_second_resizee_start_size.primary_size_for_orientation(m_orientation) - delta, 0, m_second_resizee_max_size);
if (m_orientation == Orientation::Horizontal) {
if (opportunisitic_resizee() == OpportunisticResizee::First) {
if (opportunistic_resizee() == OpportunisticResizee::First) {
m_first_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
m_second_resizee->set_preferred_width(new_second_resizee_size);
} else {
VERIFY(opportunisitic_resizee() == OpportunisticResizee::Second);
VERIFY(opportunistic_resizee() == OpportunisticResizee::Second);
m_second_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
m_first_resizee->set_preferred_width(new_first_resizee_size);
}
} else {
if (opportunisitic_resizee() == OpportunisticResizee::First) {
if (opportunistic_resizee() == OpportunisticResizee::First) {
m_first_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
m_second_resizee->set_preferred_height(new_second_resizee_size);
} else {
VERIFY(opportunisitic_resizee() == OpportunisticResizee::Second);
VERIFY(opportunistic_resizee() == OpportunisticResizee::Second);
m_second_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
m_first_resizee->set_preferred_height(new_first_resizee_size);
}

View file

@ -35,8 +35,8 @@ protected:
virtual void did_layout() override;
virtual void custom_layout() override;
OpportunisticResizee opportunisitic_resizee() const { return m_opportunistic_resizee; }
void set_opportunisitic_resizee(OpportunisticResizee resizee) { m_opportunistic_resizee = resizee; }
OpportunisticResizee opportunistic_resizee() const { return m_opportunistic_resizee; }
void set_opportunistic_resizee(OpportunisticResizee resizee) { m_opportunistic_resizee = resizee; }
private:
void override_cursor(bool do_override);