summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GSplitter.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-27 09:36:21 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-27 09:36:21 +0200
commitf1af5f26ebf035ff5fe31208810d6283430533c8 (patch)
tree0c3b4f274cfbe7873dc8cbd4d12fe0ef387087cd /Libraries/LibGUI/GSplitter.cpp
parent2b02deef283f14369bedf8748faf119866b7aab4 (diff)
downloadserenity-f1af5f26ebf035ff5fe31208810d6283430533c8.zip
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.
Diffstat (limited to 'Libraries/LibGUI/GSplitter.cpp')
-rw-r--r--Libraries/LibGUI/GSplitter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GSplitter.cpp b/Libraries/LibGUI/GSplitter.cpp
index 60574e35fc..6350f22f08 100644
--- a/Libraries/LibGUI/GSplitter.cpp
+++ b/Libraries/LibGUI/GSplitter.cpp
@@ -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();
}