Improve main widget resize behavior in Window

This commit is contained in:
hippoz 2022-06-15 19:16:04 +03:00
parent c4d9672e0b
commit 88849ea766
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -154,6 +154,10 @@ void Window::run(bool block) {
m_rect.set_height(e.xconfigure.height);
// if we have a main widget, we are going to have to resize it as well
if (m_main_widget) {
m_main_widget->rect().set_max_height(m_rect.height());
m_main_widget->rect().set_max_width(m_rect.width());
m_main_widget->rect().set_min_height(m_rect.height());
m_main_widget->rect().set_min_width(m_rect.width());
m_main_widget->rect().set_width(m_rect.width());
m_main_widget->rect().set_height(m_rect.height());
}