From 4a398f7a7b6c325f5bc662f09c4e42e55353745d Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Fri, 18 Mar 2022 19:50:32 +0200 Subject: [PATCH] make the main widget inheirt the geometry from the window --- src/Window.cpp | 1 + src/main.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Window.cpp b/src/Window.cpp index 064f05c..7473856 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -16,6 +16,7 @@ namespace Raven { void Window::set_main_widget(Widget *main_widget) { m_main_widget = main_widget; m_main_widget->set_window(this); + m_main_widget->set_current_geometry(m_current_geometry); } bool Window::spawn_window() { diff --git a/src/main.cpp b/src/main.cpp index fb43719..76a72c4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,7 +11,6 @@ int main() { window.spawn_window(); 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_do_background_fill(true); window.set_main_widget(&main_widget);