From 32524f01e26ec8712a06f19134a356e421f5a518 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Tue, 26 Jul 2022 01:06:19 +0300 Subject: [PATCH] add scrollcontainer hack for width --- src/ScrollContainer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ScrollContainer.cpp b/src/ScrollContainer.cpp index 40889da..51d359f 100644 --- a/src/ScrollContainer.cpp +++ b/src/ScrollContainer.cpp @@ -1,5 +1,5 @@ #include "ScrollContainer.hpp" -#include "src/Styles.hpp" +#include "Styles.hpp" #include #include @@ -11,6 +11,9 @@ void ScrollContainer::on_layout() { m_target->rect().set_x(-m_scroll.x()); m_target->rect().set_y(-m_scroll.y()); + // todo: doesn't work with horizontal scrolling + m_target->rect().set_min_width(rect().width()); + m_target->rect().set_max_width(rect().width()); } std::shared_ptr ScrollContainer::make_target() {