Skip to content

Commit

Permalink
GSplitter: Explicitly set the size policies when resizing.
Browse files Browse the repository at this point in the history
If we don't have the fixed size policy for the first resizee, the layout
system will just ignore the preferred sizes that we're giving it.
  • Loading branch information
awesomekling committed Jul 27, 2019
1 parent 2b02dee commit f1af5f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/LibGUI/GSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void GSplitter::mousemove_event(GMouseEvent& event)
// One or both of the resizees were deleted during an ongoing resize, screw this.
m_resizing = false;
return;
;
}
int minimum_size = 0;
auto new_first_resizee_size = m_first_resizee_start_size;
Expand All @@ -88,6 +87,9 @@ void GSplitter::mousemove_event(GMouseEvent& event)
m_first_resizee->set_preferred_size(new_first_resizee_size);
m_second_resizee->set_preferred_size(new_second_resizee_size);

m_first_resizee->set_size_policy(m_orientation, SizePolicy::Fixed);
m_second_resizee->set_size_policy(m_orientation, SizePolicy::Fill);

invalidate_layout();
}

Expand Down

0 comments on commit f1af5f2

Please sign in to comment.