From 002318c2139abf9f195c89d0607651d491ec0db7 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sat, 15 Oct 2022 14:51:58 +0300 Subject: [PATCH] improve growing behavior of widgets --- src/Widget.hpp | 2 +- src/main.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Widget.hpp b/src/Widget.hpp index 015fda6..eeb37f4 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -149,7 +149,7 @@ private: bool m_consumes_hits { false }; bool m_accepts_events { true }; bool m_absolute { false }; - bool m_grows { true }; + bool m_grows { false }; ControlWidgetType m_control_type { ControlWidgetType::Widget }; }; diff --git a/src/main.cpp b/src/main.cpp index 3305aa9..da79380 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,8 +32,9 @@ int main() { auto list_view = main_widget->add(); auto content = main_widget->add(); - auto content_layout = content->set_layout(); + auto content_layout = content->set_layout(Raven::Direction::Vertical); content_layout->set_margin(6.0); + content_layout->set_spacing(6.0); content->set_style(&Raven::raised_widget_style); auto selected_label = content->add("No selection");