mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-09 04:37:52 +03:00
GSplitter: Explicitly set the size policies when resizing.
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.
This commit is contained in:
parent
2b02deef28
commit
f1af5f26eb
Notes:
sideshowbarker
2024-07-19 13:02:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f1af5f26ebf
@ -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;
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user