mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 18:55:09 +00:00
LibGUI: Fix typo in Splitter's resizee Getter/Setter
This commit is contained in:
parent
a0a1411ec9
commit
1ea24c38b4
2 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ namespace GUI {
|
||||||
Splitter::Splitter(Orientation orientation)
|
Splitter::Splitter(Orientation orientation)
|
||||||
: m_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::First, "First" },
|
||||||
{ OpportunisticResizee::Second, "Second" });
|
{ 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);
|
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 (m_orientation == Orientation::Horizontal) {
|
||||||
if (opportunisitic_resizee() == OpportunisticResizee::First) {
|
if (opportunistic_resizee() == OpportunisticResizee::First) {
|
||||||
m_first_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
|
m_first_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
|
||||||
m_second_resizee->set_preferred_width(new_second_resizee_size);
|
m_second_resizee->set_preferred_width(new_second_resizee_size);
|
||||||
} else {
|
} else {
|
||||||
VERIFY(opportunisitic_resizee() == OpportunisticResizee::Second);
|
VERIFY(opportunistic_resizee() == OpportunisticResizee::Second);
|
||||||
m_second_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
|
m_second_resizee->set_preferred_width(SpecialDimension::OpportunisticGrow);
|
||||||
m_first_resizee->set_preferred_width(new_first_resizee_size);
|
m_first_resizee->set_preferred_width(new_first_resizee_size);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (opportunisitic_resizee() == OpportunisticResizee::First) {
|
if (opportunistic_resizee() == OpportunisticResizee::First) {
|
||||||
m_first_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
|
m_first_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
|
||||||
m_second_resizee->set_preferred_height(new_second_resizee_size);
|
m_second_resizee->set_preferred_height(new_second_resizee_size);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
VERIFY(opportunisitic_resizee() == OpportunisticResizee::Second);
|
VERIFY(opportunistic_resizee() == OpportunisticResizee::Second);
|
||||||
m_second_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
|
m_second_resizee->set_preferred_height(SpecialDimension::OpportunisticGrow);
|
||||||
m_first_resizee->set_preferred_height(new_first_resizee_size);
|
m_first_resizee->set_preferred_height(new_first_resizee_size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,8 @@ protected:
|
||||||
virtual void did_layout() override;
|
virtual void did_layout() override;
|
||||||
virtual void custom_layout() override;
|
virtual void custom_layout() override;
|
||||||
|
|
||||||
OpportunisticResizee opportunisitic_resizee() const { return m_opportunistic_resizee; }
|
OpportunisticResizee opportunistic_resizee() const { return m_opportunistic_resizee; }
|
||||||
void set_opportunisitic_resizee(OpportunisticResizee resizee) { m_opportunistic_resizee = 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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue