add scrollcontainer hack for width
This commit is contained in:
parent
533b6ebe91
commit
32524f01e2
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
#include "ScrollContainer.hpp"
|
||||
#include "src/Styles.hpp"
|
||||
#include "Styles.hpp"
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
|
@ -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<Widget> ScrollContainer::make_target() {
|
||||
|
|
Loading…
Reference in a new issue