make the main widget inheirt the geometry from the window

This commit is contained in:
hippoz 2022-03-18 19:50:32 +02:00
parent cf5bcd63b2
commit 4a398f7a7b
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 1 additions and 1 deletions

View file

@ -16,6 +16,7 @@ namespace Raven {
void Window::set_main_widget(Widget *main_widget) { void Window::set_main_widget(Widget *main_widget) {
m_main_widget = main_widget; m_main_widget = main_widget;
m_main_widget->set_window(this); m_main_widget->set_window(this);
m_main_widget->set_current_geometry(m_current_geometry);
} }
bool Window::spawn_window() { bool Window::spawn_window() {

View file

@ -11,7 +11,6 @@ int main() {
window.spawn_window(); window.spawn_window();
button.set_current_geometry(Raven::Box(10, 10, 100, 30)); button.set_current_geometry(Raven::Box(10, 10, 100, 30));
main_widget.set_current_geometry(window.get_current_geometry());
main_widget.set_background_fill_color(window.get_top_level_styles()->get_background_color()); main_widget.set_background_fill_color(window.get_top_level_styles()->get_background_color());
main_widget.set_do_background_fill(true); main_widget.set_do_background_fill(true);
window.set_main_widget(&main_widget); window.set_main_widget(&main_widget);